I'm getting this message trying to do a simple SELECT from a .DBF. I've come to the conclusion it's because of memo fields. Does Jet not support memo fields? If not, how can I pull data from a DBF?
Here's my test code that hits the error. It hits an execption with "External table is not in the expected format." on the da.Fill(dt) line. If I remove the memo fields from the DBF it runs fine.
Imports System.Data
Imports System.Data.OleDb
Module Module1
Public Sub Main()
Dim ConnectionString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\qn\data;" & _
"Extended Properties='dBASE IV';"
Dim sql As String = _
"select * from QN_DTL"
Dim cnn As New OleDbConnection(ConnectionString)
Dim da As New OleDbDataAdapter(sql, cnn)
Dim dt As New DataTable
Try
da.Fill(dt)
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
cnn.Close()
End Sub
End Module
-----
Lee Perkins
-----
Lee Perkins
TigerBase Technologies
"Lee is one that would plug his brain into the internet, if he could, and STILL scream for more" - Very good friend of Lee's