Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Error 0x80004009 Unspecified Error


Message #1 by "Owain Williams" <email@o...> on Mon, 18 Feb 2002 11:35:58
I am trying to add records to an Access database in the Session_OnLoad 

subroutine of global.asa and I get an error number 0x80004009 'Unspecified 

Error' when I try to open a recordset. The funny thing is that it is the 

second recordset I try to open, the first I open works fine and adds a 

record to the database. Here is the extract of code that I am using:



-----------------------------------

Dim conDBConnection

Dim rstRecordset1

Dim rstRecordset2



Set conDBConnection = Server.CreateObject("ADODB.Connection")

conDBConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _

	Data Source=" & Server.MapPath("MyDatabase.mdb")

Set rstRecordset1 = Server.CreateObject("ADODB.Recordset")

rstRecordset1.Open "Table1", conDBConnection, adOpenForwardOnly, _

	adLockOptimistic, adCmdTable

'Do something with the recordset

rstRecordset1.Close

Set rstRecordset1 = Nothing

Set rstRecordset2 = Server.CreateObject("ADODB.Recordset")

RstRecordset2.Open "Table2", conDBConnection, adOpenForwardOnly, _

	adLockOptimistic, adCmdTable

'This is where the error occurs.

-----------------------------------



Can anyone help?
Message #2 by "Owain Williams" <email@o...> on Mon, 18 Feb 2002 13:23:11
Sorry guys, I got the error number wrong.



I don't mean to waist your time, so I shall start a new thread with the 

correct information in it this time.



Maybe one of the web site managers might want to delete this thread

  Return to Index