I call the following function to open a database connection.
On Error Resume Next
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout = 15
conn.CommandTimeout = 30
If Err Then
set cmd = Server.CreateObject("ADODB.Command")
set rs = Server.CreateObject("ADODB.Recordset")
set cmd.activeconnection = conn
My connection is obviously stored in an application variable (Application("conn")), which looks like this:
conn = Application("conn")
If IsEmpty(conn) Then
Application("conn") = "Provider=MSDASQL.1; Persist Security Info=False; Data Source=DSNName"
Here's where the problem starts. When I download my database from the server, make changes (or don't make any changes), then upload it back to the server, I get the following error.
ADODB.Connection error '800a0e78'
Operation is not allowed when the object is closed.
Default.asp, line 15
Line 15 looks like:
Line 13 vSQL = "SELECT ID FROM SaleCount_VW"
Line 14 CLib_OpenForumDB()
Line 15 Set rsResults = oConn.Execute (vSQL)
This error will exist for HOURS, sometimes more, unless I can get a tech support guy to unload all the DB objects. For some reason that fixes the problem. I created outage.asp so people do not see this ugly error, but if I comment that code out, you see the above error. Can someone suggest to me a way to avoid this? I am desperate.