oledb connection with Microsoft.Jet.OLEDB.4.0 provider under w7 x64

0

I have simple script:

Set oConn = CreateObject("ADODB.Connection")

fPath = "c:\temp"

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & fPath & "\;Extended Properties='text;HDR=No;FMT=Delimited'"

if oConn.Errors.Count>0 then
Wscript.Echo "Error!!!" & oConn.Errors(0).Description & " code: " & Conn.Errors(0).Number
End if

try to run on Windows 7 x64 Professional or Ultimate by means of command:
c:\Windows\SysWOW64\cscript.exe 1.vbs

it finishes with error code 0x80040e21, Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Everything works pretty well if use с# or vb.net to do the same things.

Please help!!!

vbscript
windows-7-x64
adodb
oledbconnection
asked on Stack Overflow May 31, 2012 by illarionov alex • edited May 31, 2012 by illarionov alex

2 Answers

0

fPath is meant to hold a string, so you must not use Set.

ADDED

It may be a good idea to edit (and format) your question.

Did you read this article about using 64 bit drivers?

answered on Stack Overflow May 31, 2012 by Ekkehard.Horner • edited May 31, 2012 by Ekkehard.Horner
0

You can run your script in 32bit modus on a 64bit box, then you probably won't have the error, see my answer here to check in which modus you are running and restart your script in the 32bit modus if necessary.

cscript.exe opens a window

answered on Stack Overflow May 31, 2012 by peter • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0