Hi Robert,
Depending on whether the dbase files are compatible, you might try the
FoxPro and Visual FoxPro OLE DB data provider, downloadable from the link
under my signature.
Here's some VB.NET code to get you started. You should be able to translate
it to C#:
Imports System
Imports System.Data
Imports System.Data.OleDb
Module Module1
Sub Main()
Try
Dim cn1 As New OleDbConnection( _
"Provider=VFPOLEDB.1;Data Source=C:\Temp\;")
cn1.Open()
Dim cmd1 As New OleDbCommand( _
"Create Table Test (Field1 I, Field2 C(10), Field3 L)", cn1)
cmd1.ExecuteNonQuery()
' In VFP logical values are represented in text as .F. and .T.
Dim cmd2 As New OleDbCommand( _
"Insert Into Test Values (1, 'Row 1', .T.)", cn1)
cmd2.ExecuteNonQuery()
Dim cmd3 As New OleDbCommand( _
"Insert Into Test Values (2, 'Row 2', .F.)", cn1)
cmd3.ExecuteNonQuery()
Dim da1 As New OleDbDataAdapter("Select * From Test", cn1)
Dim ds1 As New DataSet()
da1.Fill(ds1)
'Dim dr1 As DataRow()
'ds1.Tables(0).Rows.Add(dr1)
'ds1.Tables(0).Rows(2).Item(0).
Console.WriteLine(ds1.Tables(0).Rows(0).Item(2).To String())
Console.WriteLine(ds1.Tables(0).Rows(1).Item(2).To String())
Console.ReadLine()
Catch e As Exception
MsgBox(e.ToString())
End Try
End Sub
End Module
--
Cindy Winegarden
ci***@cindywinegarden.com
VFP OLE DB:
http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC:
http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
"Robert Bravery" <me@u.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
HI all,
Can someone show me or point me to a place where I can find out how to
update dbase(dbf) tables.
Thanks
RObert