Reputation: 3
I'm trying to connect to an Access database through a script that would be used at login, but keep getting the "Provider cannot be found." error. From what I've found about the error, it has something to do with trying to run this with 64 bit Office, and 32 should be fine. But we have 32 bit Office running on Windows 7 Pro x64. I also found this, but I get the same error for running it with both of the wscript.exe from System32/SysWOW64. My code to connect is as follows below, in case I just did something wrong in there. Any help would be greatly appreciated.
Dim strDBPath: strDBPath = "\\server\myDB.mdb"
Dim oDBConn: Set oDBConn = CreateObject("ADODB.Connection")
Dim strConn: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath
oDBConn.Open strConn
Upvotes: 0
Views: 10128
Reputation: 31
If you're running IIS on x64 server, in your Pool you need to enable 32 bits applications.
Go to your Server Manager > Roles > Web Server (IIS) > Internet Information Services > (Server) Home > Application Pools > Actions pane click on Advanced Settings, Enable 32-Bit Applications > Change to True.
Upvotes: 3