ADO using Jet provider for text files 
Author Message
 ADO using Jet provider for text files

Has anyone ever been able to use the Microsoft Jet driver to read a
delimited text file. According to the documentation, it is supposed to
be able to do this, but whenever I try it I get the message "Microsoft
JET Database Engine: Could not find installable ISAM".

I know that I have Jet 4.0 installed and I can look in the registry and
see that all of the settings are there, but apparently something is
wrong with my connect string and I'm not identifying the type of data
properly.

If someone has gotten it to work right, can you point me to a URL which
has a solid example of reading a CSV file?

Just FYI, I'm trying to do this in VBScript.



Mon, 19 Apr 2004 20:48:24 GMT  
 ADO using Jet provider for text files
_bstr_t bstrConnStr( _T("PROVIDER=MSDASQL;DRIVER={Microsoft Text Driver
(*.txt;                 *.csv)};DefaultDir=") );
 bstrConnStr += strPath;
 bstrConnStr += _T(";DBQ=") + strPath;
 bstrConnStr += _T( ";Extensions=333;READONLY=FALSE;FIL=text;UID=admin;");

333 - custom extension (what ever you want )
strPath - i think it is obvious

hope this will help



Quote:
> Has anyone ever been able to use the Microsoft Jet driver to read a
> delimited text file. According to the documentation, it is supposed to
> be able to do this, but whenever I try it I get the message "Microsoft
> JET Database Engine: Could not find installable ISAM".

> I know that I have Jet 4.0 installed and I can look in the registry and
> see that all of the settings are there, but apparently something is
> wrong with my connect string and I'm not identifying the type of data
> properly.

> If someone has gotten it to work right, can you point me to a URL which
> has a solid example of reading a CSV file?

> Just FYI, I'm trying to do this in VBScript.



Tue, 20 Apr 2004 00:33:20 GMT  
 ADO using Jet provider for text files

Quote:

> _bstr_t bstrConnStr( _T("PROVIDER=MSDASQL;DRIVER={Microsoft Text Driver
> (*.txt;                 *.csv)};DefaultDir=") );
>  bstrConnStr += strPath;
>  bstrConnStr += _T(";DBQ=") + strPath;
>  bstrConnStr += _T( ";Extensions=333;READONLY=FALSE;FIL=text;UID=admin;");

> 333 - custom extension (what ever you want )
> strPath - i think it is obvious

> hope this will help

But that does not use jet. It uses the MSDASQL provider. I already knew
how to do that. The MSDASQL is the OLEDB provider for ODBC. I am looking
for a solution that uses the Jet 4.0 provider.


Wed, 21 Apr 2004 11:42:29 GMT  
 ADO using Jet provider for text files
From Carl Prothman's site http://www.able-consulting.com/ado_conn.htm:

You can also open a Text File using the "OLE DB Provider for Microsoft Jet"

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                   "Data Source=c:\somepath\;" & _
                   "Extended Properties=""text;HDR=Yes;FMT=Delimited;"";"

'  Then open a recordset based on a select on the actual file
oRs.Open "Select * From MyTextFile.txt", oConn, adOpenStatic,
adLockReadOnly, adCmdText

For more information, see:  Q262537

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele



Quote:

> > _bstr_t bstrConnStr( _T("PROVIDER=MSDASQL;DRIVER={Microsoft Text Driver
> > (*.txt;                 *.csv)};DefaultDir=") );
> >  bstrConnStr += strPath;
> >  bstrConnStr += _T(";DBQ=") + strPath;
> >  bstrConnStr += _T(

";Extensions=333;READONLY=FALSE;FIL=text;UID=admin;");
Quote:

> > 333 - custom extension (what ever you want )
> > strPath - i think it is obvious

> > hope this will help

> But that does not use jet. It uses the MSDASQL provider. I already knew
> how to do that. The MSDASQL is the OLEDB provider for ODBC. I am looking
> for a solution that uses the Jet 4.0 provider.



Wed, 21 Apr 2004 19:53:39 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Looking for Tables Relation using ADO with Jet provider

2. Q: How to use batch updates on acces using ado jet provider 3.51

3. Lotus 1-2-3 files using ACCESS Jet 4.0 Provider

4. ADO With Jet Provider, Multi User Hell, Please help

5. VB6 ADO, Jet "Error initializing provider"

6. VB6 ADO, Jet "Error initializing provider"

7. ADO Data Control fails to refresh with Jet 4.0 provider

8. ADO 2.1, Jet 4.0 as a Provider ?

9. VB6 ADO, Jet "Error initializing provider"

10. DataGrid Control and ADO Jet 4.0 Provider

11. ADO Jet provider bug in ORDER BY?

12. Using a .UDL file as Data Provider with a MSDataShape Provider

 

 
Powered by phpBB® Forum Software