Link to home
Start Free TrialLog in
Avatar of Christian Palacios
Christian PalaciosFlag for Canada

asked on

ODBC connection string for ODBC 6.01

Hi there,

I am trying to configure an ASP IIS website on Windows Server 2008 R2, but I'm having problems with the ODBC connection string to properly connect to an Access 2000 database.  On the old Windows Server 2003 server where this website was previously hosted, I had the connection string in this format, but it doesn't seem to work on Server 2008.

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb

I checked and the ODBC version on 2008 is 6.01.  How can I change this connection string to properly connect to this database on this new server?

Thank you,
- Christian
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Christian Palacios

ASKER

Thank you.  Does it matter what version of ODBC is on the server?
you need to use the version thats on the server
That's what I thought I did.  Here's what I have on the server, but it didn't work.

Provider=Microsoft.Jet.OLEDB.6.01;Data Source=C:\mydatabase.mdb

That's why I want to know if there is a different way to define it in Server 2008 R2.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for the delay.  I haven't had time at all to continue working on this.  I'll send an update as soon as I have time to try it out.
Hi again,

I have finally had some time to check on this.  I installed the 32bit version of Microsoft Access Database Engine 2010 so that I could install ACE OLEDB 12.0 and I could try that with our Access 2000 database.  According to this page, https://www.connectionstrings.com/ace-oledb-12-0/, I can use this to access this database, but I'm getting errors.  After checking the FailedReqLogFiles I keep getting the Module_Set_Response_Error_Status error "Internal Server Error".  Any suggestions?  Would upgrading the database to maybe 2010 help this issue??

Thanks!
can you post the code that creates your connection string? be sure to  take out any sensitive data before posting it.
I tried these two:
The first one uses a DSN connection and the second one references the DB directly.
<%
connectstring="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=ramarksheds"
connectstring="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<path>\db.mdb"
%>

Anything on IIS that I need to ensure is set?  Since it's IIS 7.0, I'm not sure if there is something else missing there.

Thanks!
that looks correct, and no, there isn't anything you need to change in IIS.

what are the errors you're getting?
From IE I keep getting this:

An error occurred on the server when processing the URL.  Please contact the system administrator.

If you are the system administrator please click here to find out more about this error.

I click that link and it takes me to where I can learn about setting up IIS 7.0 with older Access databases.  I click the "Using Classic ASP with Microsoft Access Databases on IIS" and read up on what I have to do.  It says to use 32bit ODBC and to make changes to the Application Pool for that website.  Anything else I should look at?

Thanks!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!  I was curious how to get the right error.  It says:

Microsoft Access Database Engine error '80004005'
Unspecified Error
/page.asp line 89

That line is where I am setting the connection string:
rs.activeconnection = connectstring

Thanks!
ok so this looks like a permissions issue...

open up the permissions on the folder that contains your database, and make sure the IUSR account has read/write access as well as the account NETWORK SERVICES
Ok, just made the change, but I'm still getting the same "unspecified" error.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The connectstring variable is located in another file and I am referencing that file at the top of the page using an #include tag.  It's what I have set up in the old server where these files were copied from.
so it is a connection object then?

other than that, I'm not sure what else to try. Hopefully another expert can offer some ideas
Would upgrading the database to 2010 help?  What driver needs to be installed for it to work with Access 2010?
what application pool are you using to run your site?

Upgrading to 2011 won't help this particular issue, as it's a permissions thing.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please close question.