Hi!
Today I learned about the possibility to set the UpdateCommand, InsertCommand and DeleteCommand on the OleDbDataAdapter which I use to fill the datatable which through a binding source displays data in my DataGridView.
Now I wonder, and cannot find an answer. Do I have to call those methods manually, or are they bound to some internal event handlers?
Kind regards,
Andy
Before you ask for any code, here are the main parts:
Code:myOleDBCommand.Connection = newConn myOleDBCommand.CommandText = sSQL 'SELECT statment string Dim dataAdapter As New OleDbDataAdapter(myOleDBCommand) Dim myTab As New DataTable() Dim insertCommand As OleDbCommand insertCommand = New OleDbCommand("INSERT ...") dataAdapter.InsertCommand = insertCommand dataAdapter.Fill(myTab) myGrid2BindingSource.DataSource = myTab myGrid2.DataSource = myGrid2BindingSource




Reply With Quote