Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft OLE DB Provider for ODBC Drivers (0x80004005) - Please Help?

Status
Not open for further replies.

other3

Programmer
Jul 30, 2002
92
US
The following code:

objConn = Server.CreateObject("ADODB.Connection");
objConn.ConnectionString = "DSN=pb";
objConn.Open();

used to work against my "pb" MS Access 2000 database in Win2K IIS. Then my system crashed and I had to reinstall everything. Now the "objConn.Open();" line kicks out the
the error listed below. Using a connection string instead of DSN produces the same results. To add more confusion to this problem. The code works fine in Win98 PWS.

Charlie

--- ERROR ---

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

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

Please try the following:

Click the Refresh button, or try again later.

Open the charlies home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

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

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/currentMag.asp, line 58


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Page:
GET /currentMag.asp

Time:
Monday, May 12, 2003, 9:46:03 AM


More information:
Microsoft Support

 
Assuming you have the absolute path to the database contained in the DSN, check that it (the path) is in fact correct.

Windoze typically has an app (in Control Panel > Administrative Tools for Win2k) to help you create [and test] ODBC DSNs. See if that reports a successful connection to the database.

If still not working, try adding something like [from memory]
";dbq=" & Server.MapPath("mydb.mdb")
to the connection string above.



codestorm
Newbie Life Member.
Fire bad. Tree pretty. - Buffy
<insert witticism here>
 
I believe that I have seen errors like this when developing on a W2K box (even with Service Packs installed). I also get an error sometimes along the lines of &quot;Temporary Registry Key&quot; something or other - the resultant error message to the browser is very similar to the one you have.

It's a real pain to work out what's wrong - about the only consistent &quot;solution&quot; that I've found is to:-

- Copy and paste the database using Explorer to a new name (the default effort is &quot;Copy of MyDatabase.mdb&quot;

- Delete the exisiting database

- Rename the copied version as the original name


This is not a very convincing solution, I know - but that's all I've managed to come up with and it may work on your one too. As for how to prevent the error in the first place, I'm afraid I just don't know how!
 
Thanks for y'alls advice. I'll give it try when I get a chance and let you know. To &quot;codestorm&quot; , good to hear a Buffy quote. Too bad that this is not the forum for getting into a discussion about the show. I will say as a die hard fan, I really do think that it is time to quit.
 
Thanks for y'alls advice. I'll give it try when I get a chance and let you know. To &quot;codestorm&quot; , good to hear a Buffy quote. Too bad that this is not the forum for getting into a discussion about the show. I will say as a die hard fan, I really do think that it is time to quit.

One last thing about the DSN's of the two I was using, the one above being for MS Access, they both, the other SQL Server 2000 of the same data, work with a Visual C++ app. that using those DSNs.
 
AlexNeil - the error you describe is [despite the totally misleading error message] caused by an invalid path to the database. From memory the error usually includes the word 'volatile'.

other3 - can you post the contents of the DSN?

codestorm
Newbie Life Member.
Fire bad. Tree pretty. - Buffy
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top