O'Reilly logo

Alison Balter's Mastering Access 2002 Enterprise Development by Alison Balter

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

ADO and Stored Procedures

One of ADO's strong points is its capability to execute SQL Server stored procedures. Using ADO, you can easily pass input parameters to stored procedures and retrieve the values of output parameters. The sections that follow cover the ins and outs of executing stored procedures and responding to the information that they output.

NOTE

The code examples that follow require you to create the associated stored procedures in the NorthWind database prior to running the code.

Executing a Stored Procedure

The easiest way to execute a stored procedure is to use the Command object. Listing 10.13 provides an example.

Listing 10.13. Using the Command Object to Execute a Stored Procedure
 Private Sub cmdNoParms_Click() Dim com As ...

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