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.
VBScript was mainly used to give functionality to webpages. It was originally used for client-side scripting in IE. Web developers could write and embed executable VBScript functions in the Hypertext Markup Language (HTML) of a webpage, which controls the presentation of data.
VBScript is gone. Once a scripting language to compete with JavaScript in web browsers, VBScript is now disabled by default in Internet Explorer on all supported versions of Windows after a recent Windows update.
One of the strengths of VBScript is that it uses the same familiar and easy syntax that has made VBA so popular as a programming language, making it very easy to learn for those who have some Visual Basic background. In addition, VBScript is fairly easy to learn for those without any programming experience.
Let's take a look at a few of the larger differences between VBScript and VBA: VBScript is an untyped language. Unlike Visual Basic and Visual Basic for Applications, in which the developer can define the data type of a variable in advance, all variables in VBScript are variants.
run script with SysWOW64 version
C:\Windows\SysWOW64\wscript.exe or cscript
instead of the default 64bit version from C:\Windows\System32
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:
Type the following command:
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"
Press ENTER.
Alternatively, via Internet Information Services (IIS) Manager:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With