Jump to content
Afdal

ASP Not connecting to Access Database in Windows 7 or 10

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.

Share this post


Link to post
Share on other sites

In this example, you are the system administrator of your own system. 

Have you tried the instructions in the link?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Can some one tell me which database/ ASP can work on my computer?  I am willing to upgrade/ download.  What is it that I am missing from my computer? Why the ASP is not compiling/ running? 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...