dbf files

  • Thread starter Thread starter hadi_ghanaty
  • Start date Start date
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.

--Bob
 
¤ how i can access data of dbf file with
¤ asp.net

Below is an example using Jet and OLEDB:

'Establish a connection to the data source.
Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\dBase;Extended Properties=dBase IV"

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)
 
Back
Top