Refreshing a Row After Submitting an Update

In Chapter 10, you learned how to construct and use INSERT, UPDATE, and DELETE queries to submit changes to your database. These queries are basically one-way streets. The database modifies the contents of the row based on the information you supply in the query. Although the database reports how many rows the query affected, it does not return the new contents of the modified rows.

Sometimes submitting an update to your database needs to be a two-way street. In Chapter 10, we discussed using the Microsoft SQL Server timestamp data type to ensure that you don’t unintentionally overwrite another user’s changes to the database. When the contents of the row change, the database generates a new value for ...

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.