1. Get data from a foxpro table into a dataset
2. Makes changes to the dataset
3. Update the foxpro table with the changes to the dataset
I can get 1 & 2 to work just fine but I don't know the process to get 3 done. Any help would be appreciated. Below is the code I use to get the data from the foxpro table. So "DS" is the dataset that I makes changes to. I don't add or delete records I just modify values.
Dim cmd As New OleDbCommand
Dim conStr As String = "Provider=vfpoledb;Data Source=" & file_path.Trim & file_name.Trim & ".dbf;Collating Sequence=general"
Dim conn As OleDbConnection = New OleDbConnection(conStr)
Dim sqlStr As String = "SELECT * FROM " & file_name
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
Dim ds As DataSet = New DataSet
da.FillSchema(ds, SchemaType.Source, "data")
da.TableMappings.Add("data", "data")
da.Fill(ds, "data")
2. Makes changes to the dataset
3. Update the foxpro table with the changes to the dataset
I can get 1 & 2 to work just fine but I don't know the process to get 3 done. Any help would be appreciated. Below is the code I use to get the data from the foxpro table. So "DS" is the dataset that I makes changes to. I don't add or delete records I just modify values.
Dim cmd As New OleDbCommand
Dim conStr As String = "Provider=vfpoledb;Data Source=" & file_path.Trim & file_name.Trim & ".dbf;Collating Sequence=general"
Dim conn As OleDbConnection = New OleDbConnection(conStr)
Dim sqlStr As String = "SELECT * FROM " & file_name
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
Dim ds As DataSet = New DataSet
da.FillSchema(ds, SchemaType.Source, "data")
da.TableMappings.Add("data", "data")
da.Fill(ds, "data")