You can use ODBC with the Microsoft desktop driver for dBase, or (if
dBase-created memo fields and indexes aren't involved) OleDb with the FoxPro
OLE-DB driver provided with FoxPro 8.0 and later.
Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(ConnectionString)
dBaseConnection.Open()
Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from MydBase", dBaseConnection)
Dim ds As New DataSet("dBaseTables")
da.Fill(ds, "MydBase")
Dim dt As DataTable
dt = ds.Tables("MydBase")
Dim drCurrent As DataRow
For Each drCurrent In dt.Rows
Console.WriteLine("{0} {1}", _
drCurrent("Column1").ToString, _
drCurrent("Column2").ToString)
Next
dBaseConnection.Close()
Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
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.