0

I recently started a new job and I am getting the error below when I run a script written by my predecessor. I do not get this error when I run the script on my predecessor's old laptop which is running 32 bit windows 7. I get it when I try to run the script on my desktop which is running 64 bit windows 7. I thought it might be an issue with compatibility between the 32 and 64 bit versions.

Error:
Provider cannot be found. It may not be properly installed.

Code:

objConnection.Open  "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=" & FilePath & ";" & _
            "Extended Properties=""text;HDR=Yes;FMT=Delimited;"";"

I found some other posts with the same error, but their fixes did not help me. This is the only one that had an accepted answer:
Microsoft.Jet.OLEDB.4.0 - Provider can not be found or it may not be installed
I installed and changed the provider, but I got the same error.

Thanks for the help!

Community
  • 1
  • 1
Pat
  • 51
  • 1
  • 2
  • 9

1 Answers1

2

If it's a 32 bit issue then try 32 bit vbscript. c:\windows\syswow64\wscript "c:\yourscript.vbs".

Noodles
  • 1,981
  • 1
  • 11
  • 4
  • When I run it that way I get the error "File not found" on the line `Set oFile = oFS.OpenTextFile(inputFile)`. The input file does exist, and I do not get this error on the other machine. – Pat Oct 10 '14 at 19:41
  • You haven't posted that code. Also put in `msgbox inputfile` on the line above. Press Ctrl + C to copy message boxes to the clipboard. – Noodles Oct 10 '14 at 19:55
  • Also `msgbox vartype(inputfile)` – Noodles Oct 10 '14 at 20:00