Advertisement
Advertisement
| 05.15.2008 at 07:13AM PDT, ID: 23405152 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: |
Dim MyConnection As System.Data.OleDb.OleDbConnection
MyConnection = New System.Data.OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & (Server.MapPath("~/store/temp/041001/Grocery.XLS") & ";" & _
"Extended Properties=""Excel 8.0;HDR=No;IMEX=1"""))
Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT * FROM [100120080404$]", MyConnection)
selectCMD.CommandTimeout = 30
Dim da As OdbcDataAdapter = New OdbcDataAdapter
da.SelectCommand = selectCMD
MyConnection.Open()
da.Fill(ds)
|