Matt
Is there any reason you have the connection string in a global.asa file? A good reason maybe to place a session based hit counter, extend the script time out, LCID so your application renderes dated in the dd/mm/yyyy Aussie format (the syntax for aussie is Session.LCID = 3081) or the like. IMO if its just for connecting for general web pages its not a good place to put it.
Interesting I never seen your error.
Anyhow one of many ways to skin a cat, here is how I connect:
1.create a global.asp file (in my scripts directory). This file holds things like constants, commonly dim'ed variables and the like:
dim conn,sql,EoF,...
const IUSER = "DBUsername"
const PWord = "DBPassword"
const DBNAME = "myDataBaseName"
const DBSERVER = "myComputerName"
const URLBase = "http://someDomainName/ohs/"
const DOCBase = "http://someDomainName/ohs/DocPages/Docs/"
Then I create a functions.asp file (in my scripts directory). This holds ALL of my functions including the connection string(the variables used in the connection string as seen above are held in the global.asp file so there is never a need to change the connection sting in the functions file):
Function GetConnectionString()
GetConnectionString = "Provider=SQLOLEDB.1; Password=" & pWord & "; Persist Security Info=True; User ID=" & IUSER & "; Initial Catalog=" & DBNAME & "; Data Source=" & DBSERVER & ";"
End Function
Now when you want a connection on any web page place this at the top of the page:
<% OPTION EXPLICIT %>
<% Set Conn = server.createobject("ADODB.Connection")
conn.open(GetConnectionString)
not a solution to your specific problem however its the way I connect and have done for years. All you need to change is the values held against the constants in the global.asp file for it to work.
I see you are in Sydney, we are very close...
Wind is your friend
Matt
www.elitemarquees.com.au