Try pushing the data to a DataTable as follows. The Data Source points to the path where the DBF exists and the SELECT statement points to the physical DBF table name. If that works then go back to a DataReader.
Code:
If IO.File.Exists("C:\Data\TEST.DBF") Then
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Data;Extended Properties=dBase III")
cn.Open()
Dim cmd As New OleDb.OleDbCommand("SELECT * FROM TEST")
cmd.Connection = cn
Dim dt As New DataTable
dt.Load(cmd.ExecuteReader)
DataGridView1.DataSource = dt
End If
So if you had three DBF files under C:\Data then the following code would show three items in the ListBox.
Code:
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Data;Extended Properties=dBase III")
cn.Open()
Dim DatabaseSchema As New DataTable
DatabaseSchema = cn.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, _
New Object() {Nothing, Nothing, Nothing, "TABLE"})
ListBox1.DisplayMember = "TABLE_NAME"
ListBox1.DataSource = DatabaseSchema