Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Error Type: (0x80004005) Unspecified error when opening a recordset.


Message #1 by "Ryan S" <theepushers@h...> on Wed, 24 Apr 2002 20:41:01
I'm able to get some of my pages to communicate with the access db with no 
problems, however I get errors when trying to call recordsets to open.

In my global.asa I've got:

Sub Application_OnStart
'Add your Application_OnStart code here
Application("openStr") = "Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=C:\Inetpub\Training_server\training.mdb"
End Sub

for my connection in the .asp page I'm using:

Set cn = Server.Createobject("adodb.connection")
cn.Open Application("openStr")

Connecting via the ODBC access driver works as follows:

openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
			"dbq=" & Server.MapPath("training.mdb")
Set cn = Server.Createobject("adodb.connection")
cn.Open openStr

Can anyone please help?

  Return to Index