This is how you save the changes from a DataTable to a database. Note the use of parameters and note that there are no literal values specified. The parameters specify which column of the DataTable the data is to be drawn from. Then when you call Update it can save every row by using the values contained in that row:
vb Code:
  1. Dim con As New SqlConnection("connection string here")
  2. Dim adp As New SqlDataAdapter("SELECT ID, FirstName, LastName FROM Customer", con)
  3. Dim del As New SqlCommand("DELETE FROM Customer WHERE ID = @ID", con)
  4. Dim ins As New SqlCommand("INSERT INTO Customer (FirstName, LastName) VALUES (@FirstName, @LastName)", con)
  5. Dim upd As New SqlCommand("UPDATE Customer SET FirstName = @FirstName AND LastName = @LastName WHERE ID = @ID", con)
  6.  
  7. del.Parameters.Add("@ID", SqlDbType.Int, 4, "ID")
  8.  
  9. ins.Parameters.Add("@FirstName", SqlDbType.VarChar, 50, "FirstName")
  10. ins.Parameters.Add("@LastName", SqlDbType.VarChar, 50, "LastName")
  11.  
  12. upd.Parameters.Add("@FirstName", SqlDbType.VarChar, 50, "FirstName")
  13. upd.Parameters.Add("@LastName", SqlDbType.VarChar, 50, "LastName")
  14. upd.Parameters.Add("@ID", SqlDbType.Int, 4, "ID")
  15.  
  16. adp.DeleteCommand = del
  17. adp.InsertCommand = ins
  18. adp.UpdateCommand = upd
  19.  
  20. Dim tbl As New DataTable
  21.  
  22. adp.Fill(tbl)
  23.  
  24. 'Make changes to data here.
  25.  
  26. adp.Update(tbl)
Note that everything before the declaration of the DataTable can, and in my opinion should, be done in the designer.

Note also that the grid is nowhere to be seen. Binding to the grid and making changes through the UI is all incorporated into that one comment and is irrelevant to the process of retrieving and saving the data.