I have a text file that ends with .vbs that I have written the following in:
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.ACE.OLEDB.12.0"
Conn.Properties("Data Source") = "C:dummy.accdb"
Conn.Properties("Jet OLEDB:Database Password") = "pass"
Conn.Open
Conn.Close
Set Conn = Nothing
- When I execute this on a Windows 32-bit machine it runs and ends without any notion (expected).
- When I execute this on a Windows 64-bit machine it gets the error
Provider cannot be found. It may not be properly installed.
But it is installed. I think the root of the problem is that the provider is a 32-bit provider, as far as I know it doesn't exist as 64-bit.
If I run the VBScript through IIS on my 64-bit machine (as a ASP file) I can select that it should run in 32-bit mode. It can then find the provider.
How can I make it find the provider on Windows 64-bit? Can I tell CScript (which executes the .vbs text file) to run in 32-bit mode somehow?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…