Installable ISAM error message

  • Thread starter Michael Barrett
  • Start date
M

Michael Barrett

This code produces the "Could not find Installable ISAM" error message.
Anybody have any suggestions?

strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strFilePath
strConnectString += "Extended Properties=text;HDR=Yes;FMT=Delimited"

Dim ds As New DataSet
Dim da As New OleDbDataAdapter("SELECT * FROM " & strFileName,
strConnectString)
da.Fill(ds)

I need to fill a dataset from a text file.
 
S

Scott M.

Your connection string is not formed correctly. The first part looks good
(although you didn't show us the code that generates the value for
strFilePath). I'm not familiar with the last part of the connection string
that you are appending, this could be the culprit. Try connecting without
that last part and verify that strFilePath is a valid path.
 
M

Michael Barrett

It is passing in a proper path. I was missing a ";", but I put that in place
and I still get the same error. I removed "FMT=Delimited" and got the same
ISAM error.

Here is the string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\mbarrett\My Documents\;Extended Properties=text;HDR=Yes;"

I am attempting to open a csv file. I replaced the Ext Props value with
"csv" and it still returned the same error.

Is ADO.Net incapable of this action?
 
M

Michael Barrett

Your connection string is not formed correctly. The first part looks good
(although you didn't show us the code that generates the value for
strFilePath). I'm not familiar with the last part of the connection string
that you are appending, this could be the culprit. Try connecting without
that last part and verify that strFilePath is a valid path.


No matter what I do, it craps out here: Provider=Microsoft.Jet.OLEDB.4.0

That is where it fails every time.
 
S

Scott M.

Here is the string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\mbarrett\My Documents\;Extended Properties=text;HDR=Yes;"

The string above doesn't point to any file. It only points to the My
Documents folder. You need to indicate what file you want.
I am attempting to open a csv file. I replaced the Ext Props value with
"csv" and it still returned the same error.

Why not just read this into memory via a StreamReader object? You can then
parse the file at the delimiter and read each record into a DataTable.
 
M

Michael Barrett

Here is the string:
The string above doesn't point to any file. It only points to the My
Documents folder. You need to indicate what file you want.

Really? With older versions of ADO, I pointed to a directory, then opened my
file in the SQL string. I have seen several examples listed as above as
well.

That isn't the issue. Remove everything but the Provider string and it still
gives the same message. It is a .NET compatibility issue. I remember having
these issues before trying to connect to an Access db. I wound up doing the
small app in Access to get around it.
Why not just read this into memory via a StreamReader object? You can then
parse the file at the delimiter and read each record into a DataTable.

I did.
 
P

Paul Clement

¤ This code produces the "Could not find Installable ISAM" error message.
¤ Anybody have any suggestions?
¤
¤ strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
¤ strFilePath
¤ strConnectString += "Extended Properties=text;HDR=Yes;FMT=Delimited"
¤
¤ Dim ds As New DataSet
¤ Dim da As New OleDbDataAdapter("SELECT * FROM " & strFileName,
¤ strConnectString)
¤ da.Fill(ds)

Try the following:

strConnectString += "Extended Properties=""Text;HDR=Yes;FMT=Delimited"""


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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