OLE DB Provider for ODBC error

G

Guest

When I run the following code in my ASP file:

set dbConn = Server.CreateObject("ADODB.Connection")
szPath=Server.MapPath("../../../")
szProvider="Driver=Microsoft Access Driver (*.mdb); DBQ=" & szPath
szProvider=szProvider & "\database\" & szDir & "\" & szDB & ".mdb;"
if bDebug then fpDebug.WriteLine("szProvider: " & szProvider)
dbConn.Open szProvider

I get the following error on the last line.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Disk or network error.

I know the szProvider is set to

Driver=Microsoft Access Driver
(*.mdb);DBQ=C:\bobstuff\database\thehills\HMGA.mdb;

as I write the variable to a debug file prior to trying to open it. I tried
using the code using the conn.Provider="Microsoft.Jet.OLEDB.4.0" code that
was suggested in another post, but that did not work either.

The above code works on XP w/ IIS 5.1 and Win2K w/ IIS 5.0. The database in
question is an Office 2000 database. I'm trying to migrate to a new
development machine using Vista Home Premium and Office 2007. Any suggestions
would be welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top