Thanks.
Peter
this sounds *very* strange. I have not seen VI6 *add* DTCs to hand-written
ASP 1.0 code.
can you post the before/after pages for us to see?
Hope this helps!
MCA
Michael C. Amundsen, MCP/MVP
mi...@amundsen.com
http://www.amundsen.com
=======================================================
Subscribe: VI6Newsletter (www.amundsen.com/vi6news.htm)
Join: Using VI6 Club (www.amundsen.com/vi6club.htm)
Read: Using VI6 (QUE) (www.amundsen.com/vi6book.htm)
=======================================================
Peter wrote in message ...
Thanks for responding. I need to correct myself, the ASP wasn't hand written
from scratch, it was created by data form wizard in VI1, but I only use it
as a template and have made a lot of changes to it, I even removed all the
DTC related meta tags, add and modify many ADO/HTML codings.
This is the affected portion which caused the error in ASP execution
' wizard codes, with meta tags removed
If fEmptyRecordset Then
fHideNavBar = True
fHideRule = True
Else
Loop
......
End If
' Codes I added, which would be lost after I save the ASP file
If Not IsEmpty(Session("rsProductTemp_Filter")) And Not fEmptyRecordset Then
If fSupportsBookmarks Then
rsProductTemp.MoveFirst
rsProductTemp.Move (Session("rsProductTemp_AbsolutePage") - 1) *
tPageSize
End If
End If
Set oConnectionTemp = GetTempConnection
' wizard codes, meta tags removed, adjustments made extensively
Do
..... (oConnectionTemp referenced, since the statement that creates it is
lost, execution would fail)
Loop
After I posted the previous message, I discovered that if I set "View
Controls as Text", opening and saving of the ASP file seems to be safe, but
it still adds some
<-- METADATA TYPE="DesignerControl" startspan...
kind of thing to the codes. In certain cases, I prefer the editor to
preserve the codes exactly as is without adding or deleting anything, I
wonder if there are certain practices that I should observe when dealing
with DTCs, I understand that I cannot modify DTC codes in the block (marked
by meta tags) if I want to continue using it, but codes outside of the DTC
block should be free for modifications and not interfered, even if they
reference objects in the DTC block. Any advices from you would be welcomed.
Thanks again.
Peter
OK, well VI1 is (as we say in Kentucky) "a whole 'nuther!"
The problem with modifying DTCs is that VI will sometimes attempt to use the
stored properties to 're-generate' all the code. VI1 was pretty lazy on
this, but I am finding that VI6 is more insistent.
The rules for DTCs changed quite a bit for VI6. Even tough you've used
VI1-type DTCs, I think VI6 is mucking with them based on rules it only
understands for VI6 DTCs.
In VI1 the DTCs where there only to help collect data from you and then
generate coding for use at run time. The Startspan/endspan stuff is there
to help the DTCs find out what territory is theirs to play with.
In VI6, the DTCs call other pages of code in the _ScriptLibrary as well as
gen some coding at run time. Since you are writing some code that references
the *code* inside the block, it might be that VI6 is mucky with your code
and breaking the references, eh?
Although you won't like this, my advice is to steer clear of changing code
in DTC areas. If VI6 thinks it's a DTC, it assumes you will not be altering
the code. I've not found a clear way to teach VI6 to leave my modifications
alone.
MCA
Peter wrote in message ...
The workaround is to NOT simply open the ASP page, but select "Open With...",
"Source Code (Text) Editor".
BTW the same thing will happen with ActiveX controls (<OBJECT ID=...) on an
ASP page. That is, if you have inserted VBScript into the ActiveX control
definition, the VI6 editor will re-insert the ActiveX control and destroy your
VBScript.
Now I _always_ open old VI1 pages with a source editor.
Good Luck,
Michael D. Kersey