Quote:
command.Connection = adaptater.Connection
Try
adaptater.Adapter.UpdateCommand = command
Catch ex As Exception
MsgBox(ex.Message)
End Try
Well, there's your problem. You've assigned the command to the adapter's
UpdateCommand
property, but you've never told the adapter to update anything!
You need to call the adapter's
Update
method, passing in the
DataSet
that you want to update. You might also need to initialize the adapter's
InsertCommand
and
DeleteCommand
properties, depending on whether you allow the user to create new rows and delete existing rows.
Updating Data Sources with DataAdapters[
^]