22

So I am going back to a project I created in College, so I can transfer it to PHP. I orginally coded it in ASP Classic.

I am on Windows 8 and running Access 2013.

I am currently getting the following error

ADODB.Connection error '800a0e7a' Provider cannot be found. It may not be properly installed. /PROJECT!Better/verifyuser.asp, line 11

and this is my connection string code.

Dim vPath, pPath, Conn

vPath = ".\db\Comic.accdb"
pPath = Server.MapPath( vPath )

objConn = "PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=" & pPath & ";"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open objConn

any help that you can provide would be awesome!

edit: I already have the enable 32-bit applications in IIS Activated

user692942
  • 16,398
  • 7
  • 76
  • 175
Skrilliam
  • 233
  • 1
  • 2
  • 8
  • 1
    Things to check http://stackoverflow.com/a/639286/692942, are you positive `Microsoft.ACE.OLEDB.12.0` is installed, is it even supported in Windows 8? This might also help - ['Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error](http://social.msdn.microsoft.com/Forums/en-US/f11b2df9-fd0a-4528-987f-f95dfdccee0a/microsoftaceoledb120-provider-is-not-registered-on-the-local-machine-error?forum=adodotnetdataproviders) – user692942 Feb 12 '14 at 10:06

9 Answers9

36

Check the site's Application Pool in IIS / Application Pools / YourPool / Advanced Settings :

  • Advanced / Enable 32-Bit Applications: True

There's some anecdotal evidence to suggest you do this too:

  • Managed Pipeline Mode : Classic
James McCormack
  • 9,217
  • 3
  • 47
  • 57
  • 3
    Enable 32-Bit Application is required but Pipeline Mode can be Integrated. This is how my application runs so requests go through ASP.NET security and HttpModules. – Ben Gripka Jan 06 '18 at 20:35
  • 2
    I'm going to have to get this tattooed to my hand. I keep forgetting in my senility! – Paul Nov 27 '19 at 11:55
15

You should use the provider available in your machine.

  1. Goto Control Panel
  2. Goto Administrator Tools
  3. Goto Data Sources (ODBC)
  4. Click the "Drivers" tab.
  5. Do you see something called "SQL Server Native Client"?

enter image description here

See the attached screen shot. Here my provider will be SQLNCLI11.0

VPP
  • 731
  • 1
  • 9
  • 34
  • 2
    Thanks, Vinayak Prabha, you solved my problem! I had Provider=SQLNCLI but when I looked at my drivers, I found I had two versions installed, 10.0 and 11.0. Changing to Provider=SQLNCLI11.0 fixed the problem – Breandán Dalton Apr 30 '15 at 10:02
  • Remember that this is for ODBC drivers. If you're using OLE DB drivers then you may be running into the issues relating to @JamesMcCormack's post above. – Paul Jul 02 '18 at 10:17
4

I got the same issue and It got solved by installing Oracle 11g client in my machine..

I have not installed any excclusive drivers for it. I am using windows7 with 64 bit. Interestignly, when I navigate into the path Start > Settings > Control Panel > Administrative Tools > DataSources(ODBC) > Drivers. I found only SQL server in it

Please Finc the attachment below for the same

Vamshi G
  • 75
  • 1
  • 2
  • 9
  • Are you saying that Oracle 11g client can connect to a JET or an ACE database? FYI There are two ODBC managers in 64 bit windows, the 64 bit version you find in Control Panel, and the 32 bit version which you will find at C:\Windows\SysWOW64\odbcad32.exe – John Dec 29 '14 at 17:03
  • I guess for ACE database it will not be sufficient. But to connect Oracle database Oracle 11g client will be sufficient. I got "ADODB.Connection error" while am trying to connect Oracle DB – Vamshi G Dec 30 '14 at 05:23
3

A couple of suggestions

The ACE driver isn't installed by default. It's also a 64 bit driver, so it might be worth disabling 32bit in your app pool. I've known 64 bit drivers not work when 32 bit is enabled.(eg the ISAPI filter which connects IIS to Tomcat).

The older JET driver is 32bit. It is included by default. If you could save a copy of your database as a .mdb file then using the JET driver might be a workaround

John
  • 4,658
  • 2
  • 14
  • 23
1

Have you got the driver installed? If you go into Start > Settings > Control Panel > Administrative Tools and click the Data Sources, then select the Drivers tab your driver info should be registered there.

Failing that it may be easier to simply set up a DSN connection to test with.

You can define multiple connection strings of course and set-up a 'mode' for working on different machines.

Also there's ConnectionStrings.com.

-- EDIT --

Just to further this, I found this thread on another site.

Paul
  • 4,160
  • 3
  • 30
  • 56
1

Following steps has fixed my issue.

(1) Moved the website to a Dedicated application pool.

(2) Changed the Managed Pipeline Mode from integrated to Classic.

(3) Set Enable 32-Bit Applications from false to true.

ASP pages are working fine now!

Hiren Parghi
  • 1,795
  • 1
  • 21
  • 30
0

Got this exception when maintaining very old application on Server 2003 using Asp classic on IIS6 with Oracle 9.2.0.1. The fix is by updating oracle to 9.2.0.6.

Kosmas
  • 353
  • 4
  • 11
0
  1. Under Window Administrative Tools, run ODBC Data Sources (32-bit).

  2. Under the Drivers tab, check you have the Microsoft Excel Driver (*.xls, *.xlsx etc...) - the file name is ACEODBC.DLL

  3. If this is missing, you will need to install the Microsoft Access Database Engine 2016 Redistributable.

You'll find the installer here https://www.microsoft.com/en-us/download/details.aspx?id=54920

  1. Your connection should be:
Set objConn1 = Server.CreateObject("ADODB.Connection") 
objConn1.Provider = "Microsoft.ACE.OLEDB.12.0"   
objConn1.ConnectionString = "Data Source=" & pPath & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1""" 
-1

install this https://www.microsoft.com/en-us/download/details.aspx?id=13255

install the 32 bit version no matter whether you are 64 bit and enable the 32 bit apps in the application pool