WillShakespeare
MIS
Hi guys,
I have been playing with DBs for a while and have not had much trouble until my most recent project.
I have the following code in my code.asp file (included in my asp page):
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=littleacorns.dsn"
objConn.Open
All well and good... I get the info I need from various RS calls... and this is presented on the page as required. However, if I try to go back to the page either by refresh of closing the browser and using the exact same URL, I get the following error:
Technical Information (for support personnel)
Error Type:
Provider (0x80004005)
Unspecified error
/la2/code.asp, line 20
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Pantheon Ventures Limited; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Page:
GET /la2/littleacorns.asp
Time:
28 December 2006, 21:45:08
Line 20 is the objConn.Open bit I pasted above.
Oddly enough, if I wait a few minutes and try again, it works!! I have a feeling something is not closing properly, even thoufgh my code includes the following at the end (which is the same in ALL my objConns):
objConn.Close
Set objConn = Nothing
Any ideas what is happening? Is it to do with Session timeout? If I manually close the connection this shouldn't be a problem, right?
Will
I have been playing with DBs for a while and have not had much trouble until my most recent project.
I have the following code in my code.asp file (included in my asp page):
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=littleacorns.dsn"
objConn.Open
All well and good... I get the info I need from various RS calls... and this is presented on the page as required. However, if I try to go back to the page either by refresh of closing the browser and using the exact same URL, I get the following error:
Technical Information (for support personnel)
Error Type:
Provider (0x80004005)
Unspecified error
/la2/code.asp, line 20
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Pantheon Ventures Limited; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Page:
GET /la2/littleacorns.asp
Time:
28 December 2006, 21:45:08
Line 20 is the objConn.Open bit I pasted above.
Oddly enough, if I wait a few minutes and try again, it works!! I have a feeling something is not closing properly, even thoufgh my code includes the following at the end (which is the same in ALL my objConns):
objConn.Close
Set objConn = Nothing
Any ideas what is happening? Is it to do with Session timeout? If I manually close the connection this shouldn't be a problem, right?
Will