atimo
Mar 8th, 2003, 11:26 AM
In my code I have an Include File in which I create the variables/objects to open a connection to query, edit or include redords in a database.
The code starts with:
Dim sqlData, rsTable, conn
etc....
If I insert the include file with that code in the same page twice, the system presents me the following error message:
Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/mcs/atimo/Library/new.asp, line 2, column 35
dim SqlData
-----^
Is there a function that can I check if the variable/object has been defined, before I use DIM?
I tried the following and it didn't work:
if varType(Sqldata) = 0 then dim SqlData
The code starts with:
Dim sqlData, rsTable, conn
etc....
If I insert the include file with that code in the same page twice, the system presents me the following error message:
Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/mcs/atimo/Library/new.asp, line 2, column 35
dim SqlData
-----^
Is there a function that can I check if the variable/object has been defined, before I use DIM?
I tried the following and it didn't work:
if varType(Sqldata) = 0 then dim SqlData