The Update Command

The Update statement is the most interesting of the statements generated by the wizard. It contains the parameters required to support optimistic concurrency. To see the statement, go to the Property window and find the UpdateCommand property. Just as with the SelectCommand, the UpdateCommand is an SqlCommand object. Click the plus box to expand it and then find the CommandText property. When you click the ellipsis button, a query designer opens just as with the Select statement.

					UPDATE    Customers 
SET CustomerID = @CustomerID, CompanyName = @CompanyName, ContactName = @ContactName, ContactTitle = @ContactTitle, Address = @Address, City = @City, Region = @Region, PostalCode = @PostalCode, Country = @Country, Phone = @Phone, ...

Get ADO.NET Programming in Visual Basic™ .NET 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.