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

Perma picture Perma · Mar 24, 2010 · Viewed 78k times · Source

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.

Answer

Nick Giles picture Nick Giles · Mar 7, 2011

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