odbc data adaptor / excel file and query builder in vb.net 2003 not seeing rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings All,

I'm trying to access a excel file using the odbc data adaptor but the tables arent showing up.

I can get connected to the excel file using the Wizard but when I go to do the odbc adaptor no tables show up in the query
wizard why is this?

TIA
 
Sal,

Why not the OleDbdataadaptor

\\\
Dim ConnectionString As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\test1\myExcel.xls;" & _
"Extended Properties=""Excel 8.0;HDR=NO"""
Dim Conn As New System.Data.OleDb.OleDbConnection(ConnectionString)
Dim da As New System.Data.OleDb.OleDbDataAdapter _
("Select * from [Sheet1$]", Conn)
Dim ds As New DataSet
da.Fill(ds, "Sheet1")
///

I hope this helps a little bit?

Cor
 

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

Back
Top