Depending on the type of change, the Insert, Update, or Delete command template executes to propagate the modified row to the data source. For every inserted, modified, and deleted row, the Update method determines the type of change that has been performed on it (Insert, Update or Delete). The update is performed on a by-row basis. ' Without the OleDbCommandBuilder this line would fail. ' Code to modify the data in the DataSet here. Using connection As New OleDbConnection(connectionString)Īdapter.SelectCommand = New OleDbCommand( _ Public Function CreateCommandAndUpdate( _ Without the OleDbCommandBuilder, this line would fail.Īdapter.UpdateCommand = builder.GetUpdateCommand() ![]() ![]() Code to modify data in the DataSet here. New OleDbCommand(queryString, connection) static private DataSet CreateCommandAndUpdate( The following example uses the derived class, OleDbDataAdapter, to Update the data source. ![]() An attempt to execute an INSERT, UPDATE, or DELETE statement resulted in zero records affected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |