Submitting Updates Using a SqlDataAdapter
The SqlDataAdapter class’s Update method covers all the items from the preceding list.
Create a procedure (or function) that accepts multiple DataRows
The Update method is overloaded. You can pass in a DataTable or an array of DataRows. You can also pass in a DataSet; however, the SqlDataAdapter will submit the pending changes stored in just one DataTable.
Look for DataRows that contain pending changes
The Update method walks through the DataRows submitted, checking each DataRow’s RowState property.
Access a SqlCommand that contains the updating logic that corresponds to the DataRow’s RowState property
The SqlDataAdapter class exposes properties—InsertCommand, UpdateCommand, and DeleteCommand—to store this updating ...
Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.