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!!!
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?
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.
User contributions licensed under CC BY-SA 3.0