Can't get Text connection strings to work

M

Maury Markowitz

To start with:

yes, the file exists
yes, the format is readable
yes, there is a schema.ini
yes, I have Jet 4.0 installed

Ok, here we go. I am trying to replace a MDB that contains only links
to external files with direct links to those files within my ADP. The
links in the MDB, which I assume are Jet-based, work perfectly. I am
trying to replace them with a text driver via ADO and a connection
string. Here are the strings I have tried:

Public Const actCnn = "Driver={Microsoft Text Driver (*.txt;
*.csv)};Dbq=L:\activity\;Extensions=txt"
'Public Const actCnn = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=L:
\activity\ polaract.txt;Extended Properties=""Text;HDR=NO"""

I attempt to use the links like this:

Set act = New ADODB.Recordset
act.Open "SELECT * FROM polaract.txt", actCnn, adLockReadOnly,
adCmdText
startDate = CDate(act.fields(1))

When I use the first of the two connection strings above, the first
line imports fine, and then it dies when I call MoveNext complaining
that there is a numeric field overflow. All of the fields are text, so
I have no idea what this really means.

When I use the second of the two connection strings, ADO tells me that
I don't have a loadable ISAM installed. I have read over the KB and
some threads here, but none of them lead to a problem I can find.

Any ideas?

Maury
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top