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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String

Status
Not open for further replies.

DirtyB

Programmer
Mar 13, 2001
159
US
I am connecting to an Access database through some ASP code. I copied the code directly from another server where it lives and works just fine. I opened it up on our web server and the connection string doesn't appear to work. I have another application in the on the same server connecting to an Access database, and it works perfectly. I literally copied the connection string into the new app, just changing the name, and I get one of two things:

if I try to connect with Access Driver: General error: Unable to open registry key...


if I try to connect with the OLEDB connection style string: Unspecified error...


neither one of these really tells me anything. And if you try to search on an error, I find lots of pages displaying the same errors. Has anyone run into this problem before? Know how to fix it?

Thanks
 
I think that the version of access you are using doesn't comply with the version of either OLEDB or ODBC that you have.

check out

and download the newest version of MDAC on there. see if that helps

good luck
leo
 
Thanks for the response.

Unfortunately, it's Access 2000, and it worked fine on the other server, plus, I have other ASP code on the same server connecting to a different Access 2000 database that works just fine. Here is my connection string.

database.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Application("database")

and in the global:
Application("database") = path
 
thanks again, I actually had the exact same page open, my permissions are fine, I still can't figure this out. The database and parent directories have the correct permissions.
 
Have you tried hardcoding in the string, I mean instead of calling it through the Application("path")?

If it works like that, then you might need to explicitly cast Application("path") as a string (cstr(Application("path"))
 
Thanks again....I did hardcode the path..that was the first thing I tried, but even when I do a response.write for the connection string like it is, the path comes out just fine. I don't know what else to do, i'm ready to elbow-drop my machine. The thing that just really gets me, is that the project on the same server right beside the one I am working on, does the exact same thing and it works. That would naturally make me think it was a permissions issue, but they appear to be just fine.
 
Either you dont have the Access ODBC driver installed and properly registered or you dont have appropriate permissions to view that registry key.

Go to your server and run ODBC Admininstrator (under Admin. Tools in the Control panel). Select the Drivers tab. Locate Microsoft Access Driver (*.mdb). If you cant find it, you'll need to install MDAC from Leo's URL above.

If it is apparent in the list, run RegEdt32 from the Start Menu. Select the window with the title "HKEY_LOCAL_MACHINE on Local Machine". Drill down to the key HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\Microsoft Access Driver (*.MDB). Check this key for the appropriate permissions.

Jon Hawkins
 
Jon:

Thanks for your help. I looked into those things. The permissions for the keys are fine because we have another app that connects to an Access database that uses them, and it works fine...I double checked just to be sure though. I have tried so many different things, this may be of interest: When I use a connection string using the Access Driver and ODBC, I get that registry key permission error. When I use a connection string with the OLEDB JET thing, I get an error that says "unspecified error".

I just can't hit this database from anywhere. The permissions appear to be fine, the drivers are cool because they are being used by other apps just fine. I don't know what else to try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top