Hi,
I have a web application with many (JavaScript) ASP pages. Currently, the following lines are in every one:
var adoConnection = Server.CreateObject("ADODB.Connection"
adoConnection.Open("DSN=MY_DSN"
This connection string may have to change in the future - due to configuration changes in the production environment. I would really like to move these lines into an INCLUDE file and just reference them once.
Can anyone give me an idea of how I would do this? I have tried building a function with just these two lines in it, then calling that function, but it hasn't worked for me. It's like I can't successfully pass "adoConnection" back and forth from the function.
Thanks in advance!
I have a web application with many (JavaScript) ASP pages. Currently, the following lines are in every one:
var adoConnection = Server.CreateObject("ADODB.Connection"
adoConnection.Open("DSN=MY_DSN"
This connection string may have to change in the future - due to configuration changes in the production environment. I would really like to move these lines into an INCLUDE file and just reference them once.
Can anyone give me an idea of how I would do this? I have tried building a function with just these two lines in it, then calling that function, but it hasn't worked for me. It's like I can't successfully pass "adoConnection" back and forth from the function.
Thanks in advance!