O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Product Data

Though the ProductEditor.aspx Web form can now be used to update product information, there's still no way to add new products into the database. In this section, you'll see how to modify the existing Product Editor to also handle the case where a user needs to enter a new product. You could create an entirely new screen to handle product additions, but because this new screen would be very similar to the existing Product Editor, it makes sense to just modify the existing code to handle both cases.

The stored procedure Product_Add in Listing 22.5 performs the actual addition of new product data into the database. Notice that the parameters are nearly the same as for the Product_Update stored procedure in Listing 22.1. However, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required