Home > Software engineering >  With what method or event BindingNavigator update data set to the original database?
With what method or event BindingNavigator update data set to the original database?

Time:11-13


Dim objDataAdapter As New OleDbDataAdapter
Dim objDataTable As New DataTable
Dim oleBuilder As New OleDbCommandBuilder (objDataAdapter)

ObjDataAdapter. The Fill (objDataTable) 'will load data from a data source to the objDataTable

Here I have code binding text boxes, picture box to modify data in a objDataTable
Click BindingNavigator forward, after the back button, the modified data in the objDataTable,
But these data did not update to the original database


Can I use a separate button, the following update to the original database
Private Sub btnUpdate_Click (sender As Object, As EventArgs e) Handles btnUpdate. Click
ObjDataAdapter. Update (objDataTable) 'aaaa
End Sub

Now ask, what processing BindingNavigator event or method, click the BindingNavigator forward, after the back button,
Automatic update of a data to the original database?

CodePudding user response:

If there is no appropriate method to update data set to the original database, then ask another question,
Is don't use the mouse to click, how to use the code execution BindingNavigator forward, backward navigation capabilities?

CodePudding user response:

They can navigate with the following statement:
BindingNavigator1. MoveNextItem. PerformClick ()
  • Related