VBScript & Access MDB - 800A0E7A - "Provider cannot be found. It may not be properly installed"
Asked Answered
T

7

15

I've having a problem with a VBScript connecting to an access MDB Database. My platform is Vista64, but the majority of resources out there are for ASP/IIS7.

Quite simply, I can't get it to connect. I'm getting the following error: 800A0E7A - "Provider cannot be found. It may not be properly installed"

My code is:

Set conn = CreateObject("ADODB.Connection")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database.MDB"
conn.Open strConnect

So far I have ran %WINDIR%\System32\odbcad32.exe to try to configure the Driver in 32bit mode, but it hasn't done the trick. Any suggestions would be greatly appreciated

Just as an addition, I'm trying to get this .vbs script to run by double clicking and letting it do it's thing. This code isn't embedded into another lang/script.

Tricky answered 24/3, 2010 at 13:38 Comment(3)
Is C:\WINDOWS\system32\msjetoledb40.dll present on your machine? Also try creating a file named test.udl and launching it. Does the Microsoft.Jet.OLEDB.4.0 provider appear in the provider list?Elihu
C:\WINDOWS\system32\msjetoledb40.dll is not on the machine and Microsoft.Jet.OLEDB.4.0 does not appear in the Provider listTricky
Then it would seem you need to install MDAC: microsoft.com/downloads/… I don't know why you would need to do that since it has been part of the OS for years, but it shouldn't hurt anything...Elihu
I
20

run script with SysWOW64 version
C:\Windows\SysWOW64\wscript.exe or cscript
instead of the default 64bit version from C:\Windows\System32

Investiture answered 7/3, 2011 at 15:47 Comment(1)
Thanks, that was my problem, trying to adodb read xls files on win10 using .vbs scriptsEmbraceor
M
6

On Microsoft TechNet Configuring IIS to Run 32-bit Applications on 64-bit Windows (IIS 6.0):

To enable IIS to run 32-bit applications on 64-bit Windows:

  1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
  2. Type the following command:

    cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"
    
  3. Press ENTER.

Alternatively, via Internet Information Services (IIS) Manager:

  1. Access Application Pools
  2. Right click on "ASP.NET v4.0 Classic"
  3. Select "Set Application Pool Defaults ..."
  4. Under General change "Enable 32-Bit Applications" from "False" to "True"
  5. Click OK

If you wish to run both 32-bit and 64-bit applications, there's various blogs to do it, such as Rakki Muthukumar's blog IIS7 - Running 32-bit and 64-bit ASP.NET versions at the same time on different worker processes.

Mulvihill answered 10/2, 2012 at 3:20 Comment(0)
P
3

Alternatively, via Internet Information Services (IIS) Manager:

Access Application Pools Right click on "ASP.NET v4.0 Classic" Select "Set Application Pool Defaults ..." Under General change "Enable 32-Bit Applications" from "False" to "True" Click OK

When I change this settings it is worked. thank you guys.. :)

Preacher answered 12/6, 2013 at 6:22 Comment(0)
V
3

Just use

strConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= "

if you 've all needed drivers

Vocative answered 3/1, 2014 at 5:41 Comment(0)
C
0

I used this it worked for me without any error:

sconnect = "Provider=MSDASQL.1;DSN=Excel Files;DBQ=" & myPath & ";HDR=Yes';"
Set con = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")

con.Open sconnect
sSQLQry = "SELECT * FROM [" & tableName & "];"
Set rs = con.Execute(sSQLQry)
Come answered 17/12, 2017 at 23:9 Comment(0)
M
0

we had same issue where we were getting exception

Provider cannot be found. It may not be properly installed

with following machine configuration:-

machine:- window 10
oracle client installed:- oracle 12c
provider:- MSDAORA.Oracle (instead of OraOledb)

we have read number of blogs to resolve this where every post saying configuration issue between oracle client 12 to 11G version having 62 to 32bit inter dependency and lot more but it got resolved while changing the provider name from capital letter to small.

earlier provider name was:- MSDAORA.Oracle (Here Oracle "O" is in capital letter ) now provider name is:- MSDAORA.oracle (Here oracle "O" is in small letter )

please give a try, if that works for you :)

Marion answered 12/12, 2019 at 14:2 Comment(0)
L
-1

Check this out

EDIT: Warning, the link below goes straight to a download of 2007 Office System Driver: Data Connectivity Components.

http://www.microsoft.com/download/en/confirmation.aspx?id=23734

Installed it, read the instruction and everything worked as a charm.

Lefler answered 19/12, 2011 at 11:11 Comment(1)
Link is dead :(Paoting

© 2022 - 2025 — McMap. All rights reserved.