I have a form that has textboxes bound to a dataset which
I am trying to update.
What the form has is:
DsCampaign1- Dataset
OleDbDataAdapter1- dataadapter
OleDBConn - db connection
The OleDbDataAdapter1 is bound to a table that has one row.
On form load the textboxes get the data from the row of
the db via this code:
DsCampaign1.Clear()
OleDbDataAdapter1.Fill(DsCampaign1)
The issue is getting the data to update in the database.
The form close has the following code (to write the data
back to the db)
Dim intRowSwapper As Integer = Me.BindingContext _
DsCampaign1, "RBIGoals").Position - 1
Me.BindingContext(DsCampaign1, "RBIGoals").Position _
+= intRowSwapper
OleDbDataAdapter1.Update(DsCampaign1)
If I look at the dataset in the immed window via:
?DsCampaign1.Tables("RBIGoals").Rows.Item(0).Item
("NetIncome")
the updated data is there, however it never reaches the
table.
|