Results 1 to 3 of 3

Thread: [RESOLVED] DGV+ binding source( table filled with OleDBDataAdapter) - call adapter Command

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2013
    Posts
    134

    Resolved [RESOLVED] DGV+ binding source( table filled with OleDBDataAdapter) - call adapter Command

    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
    Last edited by AndyLD; May 14th, 2013 at 04:40 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width