Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Book Cover Beginning Visual Basic SQL Server 7.0
92774 times
Rated
Read 92,774 times

Contents

Related Categories

Stored Procedures - Introduction

Introduction

This is a sample chapter from Beginning Visual Basic SQL Server 7

In Chapter 5 we used SQL statements to insert, select, update, and delete data, and in the last chapter we used SQL statements to select data from the State_T table. While the use of in-line SQL statements is great for ad-hoc queries, they are not generally used in production applications. They do, however, have their place in production applications where dynamic SQL statements are to be built and executed. Dynamic SQL statements are SQL statements that are built in your VB code, thus they are generated dynamically at run-time. You typically use If.. Else.. EndIf statements to build the SQL statements needed to retrieve the data that the user has requested. For the most part stored procedures are used, and provide many benefits over in-line Transact-SQL statements.

This chapter explores stored procedures and demonstrates some of the basic tasks that can be accomplished with them. We will take a look at stored procedure parameters and see how they can be used to build robust stored procedures. All of the stored procedures created in this chapter will be executed in a VB front-end program that we will create.

In this chapter we will examine:

  • Stored procedure performance
  • Input and output parameters and the return value
  • Stored procedures that select, insert, update, and delete data
  • Comments

    • What's meant by this?

      Posted by feffe on 03 Jun 2005

      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!

    • Books-Stored Procedures

      Posted by blackdevil1979 on 08 Jun 2004

      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.
      ...