Library sample chapters

Stored Procedures

Summary

As we wrap things up in this chapter you should feel pretty good about your data entry program. Not only have you coded a program that uses stored procedures and performs all types of data entry, but you have also encapsulated all of the basic functionality into one class. This class can be used by other programs and server components, or can even be made into a server component by itself. We will be using this class in other examples later in the book.

We have taken a look at stored procedure performance and user prefixes. We now know why we should use stored procedures versus in-line SQL statements, and why we should always prefix our stored procedures with the user prefix.

We have also explored the basic SELECT, INSERT, UPDATE, and DELETE stored procedures and have used them in our program. You should feel comfortable using stored procedures and passing parameters to them. You should also understand the difference between stored procedure input and output parameters and return values.

In summary, you should know:

  • The different parameters of a stored procedure
  • How to process the data in an output parameter returned from a stored procedure
  • How to process a return value returned from a stored procedure
  • How to create stored procedures and code stored procedure parameters
  • How to execute stored procedures in your VB programs
  • Why and how to set permissions on your stored procedures
  • In the next chapter we will take a closer look at the benefits of stored procedures over in-line SQL statements, and consider some ways to optimize both.

    Comments

    1. 03 Jun 2005 at 10:53

      Hi there!


      What is meant by this: 3.    Don't forget to set a reference to the Microsoft ActiveX Data Objects Library in your project?


      Thanks ALOT!

    2. 08 Jun 2004 at 19:34

      As a new user to the the vb.net, I am curious to know how things work. But when I try some codes written in the book " Beginning Visual Basic .NET Database Programming", I am stuck in a few places.


      Firstly, the instruction said "Change the Modifiers property from Assembly to Family." which i cannot find either Assembly or Family in the Properties. So I change Modifier - Friend (assuming that's what the author refer to as assembly) to Public (assuming it's the other word for Family).


      Secondly, during creating stored procedures, I only can see Refresh and Properties when trying to create New Stored Procedures.


      please advice

    3. 01 Jan 1999 at 00:00

      This thread is for discussions of Stored Procedures.

    Leave a comment

    Sign in or Join us (it's free).

    Want to stay in touch with what's going on? Follow us on twitter!