Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net SQLCommandBuilder Insert New Records From DataGridView

Hi
I have a DataGridView that is loaded using the following VB.net code
        Dim connection As New SqlConnection(CS)
            dbadp2 = New SqlDataAdapter(sSQL, connection)
            dbadp2.Fill(dTable2)
            Me.DataGridView1.DataSource = dTable2

Open in new window


The user adds new information by typing the data into the bottom row of the DataGridView.
What VB.net code would I use to insert these NEW records to the data table. Something like the following line

dbadp2.InsertCommand = builder.GetInsertCommand
SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks