Jump to content

ASP Not connecting to Access Database in Windows 7 or 10


Afdal

Recommended Posts

Code from W2Schools works in 'Show Example' but not on my Windows 10 or Windows 7 computer.

Ref: https://www.w3schools.com/asp/ado_connect.asp

Simple ASP stuff works. Only when I make a call to connect to the database, I get the following error message:

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.

Please help.

Link to comment
Share on other sites

Yes, both ASP and ISAPI Extensions are installed.

FYI: Access database is 2007, on Windows 10 Home (64bit).

I also installed AccessDatabaseEngine.exe from Microsoft website. I assumed it would help run 32bit MS Access on 64bit system. 

I also changed the Debugging Property [Send Errors To Browser] to True in InetMgr.  And, now the error message makes a little more sense.

Error message is:
ADODB.Connection error '800a0e7a'
Provider cannot be found

This is the 3 lines of code I am trying to running:

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:/inetpub/wwwroot/mysite/myAccessDB.accdb"

%>

Edited by Afdal
Link to comment
Share on other sites

If I had to guess, I'd say the provider isn't found.  You''re asking for a specific version, are you sure that one is included in what you installed?

https://www.connectionstrings.com/access/

That has a note about using Jet in 64-bit environments, it sounds like you use a different driver for that.

Link to comment
Share on other sites

I figured it out.  I will post the solution here for others to benefit from.

Problem: Access 2007 is 32 bit and Windows 10 is 64 bit (& IIS is also 64 bit).  They have turned off 32 bit in IIS.  That is why the above code didn't work.

Solution: Enable 32-bit in [Application Pool]. 
Open InetMgr.exe 
Follow step 1 to 5 in attached snapshot, for all of the Application Pools (unless you know which one is it, then enable 32-bit for that one only).

Application Pools to 32 Bit.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...