Question Update Database using datagridview

confused

New member
Joined
Sep 2, 2009
Messages
2
Programming Experience
Beginner
I am building an application in which I am using Ms Access as the database.
Now when somebode searches the data is shown in Datagridview conrol using only dataadapter and dataset methods
Now I want that if user do the chenges in the DataGridView and then clicks on update button then data should gets updated.

But I am not finding any way to do that......


I am compeletely confused.....

Please help me out
 
Try this:
VB.NET:
    ' Save data from DataGridView into Database

    Private Sub updateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateButton.Click
        Me.Validate()
        Me.myDA.Update(Me.myDataSet.Tables("MyTable"))
        Me.myDataSet.AcceptChanges()
    End Sub

Hope this helps! :)
 
Try this:
VB.NET:
    ' Save data from DataGridView into Database

    Private Sub updateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateButton.Click
        Me.Validate()
        Me.myDA.Update(Me.myDataSet.Tables("MyTable"))
        Me.myDataSet.AcceptChanges()
    End Sub

Hope this helps! :)


please help me guys
Me.myDA
and
Me.myDataSet

giving error helps? what else do i need to add
 
please help me guys
Me.myDA
and
Me.myDataSet

giving error helps? what else do i need to add

What do you think 'myDA' and 'myDataSet' represent?
 
Back
Top