Committing changes in a DataSet

Fawaz

New member
Joined
Jan 1, 2012
Messages
1
Programming Experience
Beginner
Hi,

This is my first post here and any help is highly appreciated!

I'm trying to do a Simple Binding with MS access, i have Binded the controls to the DataSet successfully.

I can pull the records fine but i can't Commit any changes in the DB. Below is the codes that I'm using for both update and insert buttons.

Appreciate your support

Fawaz


'Private Sub Updatex_Click(ByVal sender As System.Object, ByVal e As _
'System.EventArgs) Handles Updatex.Click
'Try
'Me.BindingContext(DataSet11, "table1").EndCurrentEdit()
'Me.OleDbDataAdapter1.Update(DataSet11)
'Catch
'End Try
'End Sub


'Private Sub Insert_Click(ByVal sender As System.Object, ByVal e As _
'System.EventArgs) Handles Insert.Click
'Me.BindingContext(DataSet11, "table1").AddNew()
'MsgBox("Successfully Inserted")
'End Sub
 
What value does your call to Update return? If it's zero then there are no changes in the DataTable to save. If it's not zero then the changes are being saved. In the second case, if you think they aren't being saved then you are looking in the wrong place or at the wrong time for the changes, in which case you should follow the first link in my signature to learn how to manage local data files.
 
Back
Top