By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,338 Members | 1,346 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,338 IT Pros & Developers. It's quick & easy.

update dbase (dbf) tables

P: n/a
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
Feb 5 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

You can use ODBC, I do not remember if you can use OLEDB, go to
connectionstrings.com and see what options you have.
--
Ignacio Machin
machin AT laceupsolutions com
"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
|
|
Feb 5 '07 #2

P: n/a
you also mite find some c/c++ rdd/dll out there and
wrap them

dave

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:Oo*************@TK2MSFTNGP06.phx.gbl...
Hi,

You can use ODBC, I do not remember if you can use OLEDB, go to
connectionstrings.com and see what options you have.
--
Ignacio Machin
machin AT laceupsolutions com
"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
|
|


Feb 6 '07 #3

P: n/a
Hello Robert,

Just to add to Mark's post the native dbf access is realized in CodeBase lib

RBCan someone show me or point me to a place where I can find out how
RBto update dbase(dbf) tables.

---
WBR, Michael Nemtsev [C# MVP]. Blog: http://spaces.live.com/laflour
team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Feb 6 '07 #4

P: n/a
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


Feb 6 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.