Hello Friends,
I Have a Create Application in VB.Net 08, and i have one DataGrideView, and showing Database Data in That DataGrideView, and i want direct update from SataGridView, using Button Click Event, When I Press Update but it will give this Error : "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Note: Im Using SQL Server.
Code:
Please Help Me to Solve This Problem...
Thanks In Adv...
I Have a Create Application in VB.Net 08, and i have one DataGrideView, and showing Database Data in That DataGrideView, and i want direct update from SataGridView, using Button Click Event, When I Press Update but it will give this Error : "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Note: Im Using SQL Server.
Code:
Private Sub Add_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ada.Fill(tab)
DataGridView1.DataSource = tab.Tables(0)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ada.Update(tab)
End Sub
Please Help Me to Solve This Problem...
Thanks In Adv...