This must be a very simple question for most of you, but is important to me becos of the time constraint...
I have a file say incFile.asp which declares variable as:
Dim strConnection
I include this asp in every file that needs a database connection (I should have used Application variable, but it was built that way earlier and is very tough to change completely...)
I have a file, say parentFile.asp that calls another file, say childFile.asp and also includes the above asp:
<!--#include file="incFile.asp"-->
myVar = "true" <--------- setting a variable to distinguish b/w parent and child
<!--#include file="childFile.asp"-->
in childFile.asp too, I need incFile.asp. So, in childFile, I should not include incFile when parent is including child. Else, I should include incFile in childFile. For this, I am trying to use some variable called myVar (shown above). In childFile, I check this variable and if it is not true, I include incFile.
This doesnot seem to work as anytime, the error comes up saying:
Name redefined
Dim strConnection
Whats wrong and Is there any other way to do it?
Thanx
I have a file say incFile.asp which declares variable as:
Dim strConnection
I include this asp in every file that needs a database connection (I should have used Application variable, but it was built that way earlier and is very tough to change completely...)
I have a file, say parentFile.asp that calls another file, say childFile.asp and also includes the above asp:
<!--#include file="incFile.asp"-->
myVar = "true" <--------- setting a variable to distinguish b/w parent and child
<!--#include file="childFile.asp"-->
in childFile.asp too, I need incFile.asp. So, in childFile, I should not include incFile when parent is including child. Else, I should include incFile in childFile. For this, I am trying to use some variable called myVar (shown above). In childFile, I check this variable and if it is not true, I include incFile.
This doesnot seem to work as anytime, the error comes up saying:
Name redefined
Dim strConnection
Whats wrong and Is there any other way to do it?
Thanx