VBS - Provider cannot be found. It may not me properly installed.

  • Thread starter Thread starter LenJr
  • Start date Start date
L

LenJr

I have Access 2007 installed on my machine and I am trying to use the
following to connect to a delimeted text file using a VB script:
objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathName & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited'"""
This use to work for me when I was running Access 2003. I am getting the
following error message:
Error: Provider cannot be found. It may not me properly installed.
code: 800A0E7A
source: ADODB.Connection

I read something about the Access 2007 running with 64 bit may cause an
issue with this.....but is there
someway to get around this?

Thanks.
 
You would appear to have a single quote after FMT=Delimited. All you should
have is the three double quotes.
 
Still having the issue:

Set objConnection = CreateObject("ADODB.Connection")

objConnection.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & strPathName & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"""
 
Afraid I'm running out of ideas.

Can you create a linked table pointing to that text file, or import it into
Access? If not, you may have to reinstall Access.
 
I am running a script that dynamically runs through a folding reading all txt
files and writing the records I want to 1 csv file. I had this working at a
different shop...just changed jobs and trying to run the same logic and it is
not working.....I do have Access 2003 and 2007 on this machine.
 
The point of my question was simply to see whether the Text IISAM was
properly installed when you installed Access 2007.

If you can't link using Access, then it's not surprising your script doesn't
work.

If you can link using Access, then something else is causing the problem.
 
Sorry about that. Yes...using Access 2007 and Access 2003 I am able to link
to a text file.
 
The only other suggestion I have, I'm afraid, is to try putting a semi-colon
at the end of the string (and ensure that strPathName ends in a slash)

objConnection.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & strPathName & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"";"
 
Thanks for your help....but still not working. I tried my code on a
different PC that just has Office 2007 loaded and it works....so it is
something on my PC......
 
Back
Top