Could not find installable ISAM

T

TheOne

Hi I am trying to open or to fill in to dataset sample excel file. Got it
working couple days ago, but it is giving me error now. It is same error on
2 different machines. Please help.

Code......

Dim sList, strConnToExcel As String

Dim connectionObj As New OleDbConnection

Dim oCmd As New OleDbDataAdapter

Dim oDS As New DataSet



'OpenFileDialog1.ShowDialog()

strConnToExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\TEST2.XLS;Extended Properties=Excel 8.0; HDR=NO;"

sList = "test"



connectionObj.ConnectionString = strConnToExcel

oCmd = New OleDb.OleDbDataAdapter("SELECT * FROM [" + sList + "$]",
connectionObj)

Try

oCmd.Fill(oDS)

Catch ex As Exception

End Try





Thanks,

Sinisa
 
P

Paul Clement

¤ Hi I am trying to open or to fill in to dataset sample excel file. Got it
¤ working couple days ago, but it is giving me error now. It is same error on
¤ 2 different machines. Please help.
¤
¤ Code......
¤
¤ Dim sList, strConnToExcel As String
¤
¤ Dim connectionObj As New OleDbConnection
¤
¤ Dim oCmd As New OleDbDataAdapter
¤
¤ Dim oDS As New DataSet
¤
¤
¤
¤ 'OpenFileDialog1.ShowDialog()
¤
¤ strConnToExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=C:\TEST2.XLS;Extended Properties=Excel 8.0; HDR=NO;"
¤
¤ sList = "test"
¤
¤
¤
¤ connectionObj.ConnectionString = strConnToExcel
¤
¤ oCmd = New OleDb.OleDbDataAdapter("SELECT * FROM [" + sList + "$]",
¤ connectionObj)
¤
¤ Try
¤
¤ oCmd.Fill(oDS)
¤
¤ Catch ex As Exception
¤
¤ End Try
¤

You need to be careful with the syntax when using additional Extended Properties:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\TEST2.XLS;Extended Properties=""Excel 8.0;HDR=NO"""


Paul
~~~~
Microsoft MVP (Visual Basic)
 
T

TheOne

Thanks, it is working now. I am not sure why it is giving that exception.
Thanks,
Sinisa
Paul Clement said:
¤ Hi I am trying to open or to fill in to dataset sample excel file. Got it
¤ working couple days ago, but it is giving me error now. It is same error on
¤ 2 different machines. Please help.
¤
¤ Code......
¤
¤ Dim sList, strConnToExcel As String
¤
¤ Dim connectionObj As New OleDbConnection
¤
¤ Dim oCmd As New OleDbDataAdapter
¤
¤ Dim oDS As New DataSet
¤
¤
¤
¤ 'OpenFileDialog1.ShowDialog()
¤
¤ strConnToExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=C:\TEST2.XLS;Extended Properties=Excel 8.0; HDR=NO;"
¤
¤ sList = "test"
¤
¤
¤
¤ connectionObj.ConnectionString = strConnToExcel
¤
¤ oCmd = New OleDb.OleDbDataAdapter("SELECT * FROM [" + sList + "$]",
¤ connectionObj)
¤
¤ Try
¤
¤ oCmd.Fill(oDS)
¤
¤ Catch ex As Exception
¤
¤ End Try
¤

You need to be careful with the syntax when using additional Extended Properties:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\TEST2.XLS;Extended Properties=""Excel 8.0;HDR=NO"""


Paul
~~~~
Microsoft MVP (Visual Basic)
 
K

Kevin Yu [MSFT]

Hi TheOne,

Just as Paul mentioned, the Extended Properties has to be put in the
quotes, it's the syntax of connection string. If the syntax is incorrect,
it will look for another driver, and gives Could not find installable ISAM
exception.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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