Chapter 8: Using Stored Procedures

Chapter 8 - Using Stored Procedures
byJohn Kauffman, Fabio Claudio Ferracchiatiet al.?
Wrox Press ?2002

Overview

We've come a long way. In recent chapters, you've learned how to retrieve data from a database, and how to create, insert, modify, and delete the records that databases contain. In the next chapter, we'll begin to look at the place of ASP.NET code and databases in enterprise applications, but before that we have one more important subject to consider. We need to take a look at stored procedures.

Stored procedures are a key component of a client-server enterprise database system, providing many benefits for both performance and development. A stored procedure is a set of SQL statements that have been compiled into a single unit, and stored in the database they're intended to work with. It can be as simple as a single SELECT statement, or it can contain multiple statements that perform complex calculations and make updates to many tables. In this chapter, we'll examine:

  • What stored procedures are, and why they can be so useful

  • How to call stored procedures from ASP.NET code

  • How to create stored procedures in an MSDE database using Visual Basic .NET

  • How to pass parameters to stored procedures

  • How to retrieve information from a stored procedure through the parameters you pass to it

In this chapter, we're specifically considering SQL Server and MSDE databases. In Access, we can implement queries, which are similar in many ways to stored procedures.



Beginning ASP. NET 2.0 and Databases
Beginning ASP.NET 2.0 and Databases (Wrox Beginning Guides)
ISBN: 0471781347
EAN: 2147483647
Year: 2004
Pages: 263

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net