Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI have very successfully used VB6 and ADO to read/write to DBF files in the past. But we have converted to VB.Net and I am stuck with a problem on SAVING the dbf files. I can read/append/edit the ADO.Net datatable, but I cannot save it to the file when I'm done. Below are the details of the code I'm working with:
Public Sub DoIt()
DIM ds as new dataset
Dim oConnWireDbf As New OleDb.OleDbConnection(Conn
oConnWireDbf.Open()
'
sSql = "SELECT * FROM Wire"
Dim da As New OleDb.OleDbDataAdapter(sSq
da.Fill(ds, "rsLiveWireDBF")
'
dtLiveWireDBF = ds.Tables("rsLiveWireDBF")
For xRows = 0 To dtLiveWireDBF.Rows.Count - 1
'Do some things to the datatable
Next xRows
'
'Everything works down to here. From the command window I can print the records and fields that i added/edited
'so all I need to do now is save it.
'------------------------
'I have tried these (individually and collectively to no avail)
dtLiveWireDBF.AcceptChange
ds.Tables("rsLiveWireDBF")
da.Update(ds, "rsLiveWireDBF")
'------------------------
oConnWireDbf.Close()
oConnWireDbf = Nothing
End Sub
Public Function ConnWireDbf() As String
Dim r As String
'The old driver I used in with VB6 and ADO
r = "Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB
r = r & "BackgroundFetch=No;Collat
'
The new driver I need with VB.NET and ADO.NET
r = "Provider=Microsoft.Jet.OL
r = r & "User ID=Admin;Password= """""
Return r
End Function
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: DotNetLover_BaanPosted on 2004-06-25 at 15:29:19ID: 11403059
Comments are available to members only. Sign up or Log in to view these comments.