November 2001
Beginner to intermediate
816 pages
16h 3m
English
Stored procedures provide a degree of efficiency over the normal database calls shown so far. The program in this section uses the SQL Server data provider for working with stored procedures. Listing 19.5 shows the implementation of the SQL Server managed provider, how to create a stored procedure, and how to execute a stored procedure with parameters.
using System; using System.Data; using System.Data.SqlClient; /// <summary> /// Program demonstrating creating and /// execution of stored procedures. /// </summary> class StoredProcedures { // print shippers table to console void PrintReport() { SqlDataReader dbReader = null; SqlConnection conn ... |
Read now
Unlock full access