Updating Product Data

In the preceding hour, you saw how to create a set of screens that displays a list of products and enables you to click on a particular product to see the detailed product information. The next few sections of this hour reinforce the same three-tier style of development by implementing an administrative section.

The stored procedure that will actually update the product information in the database is straightforward and provided in Listing 22.1. As you can see, it accepts the product values as parameters and passes those parameters to an UPDATE query. When the query is done, the number of records updated by the query is passed back to the calling method. This can be used to ensure that the update had no errors. Because we're ...

Get Sams Teach Yourself ADO.NET in 24 Hours 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.