May 2002
Beginner
408 pages
9h 10m
English
There are a few different ways to execute stored procedures within ADO.NET. The first section following uses methods you've already seen. Then, you'll see the generally accepted standard way of executing the stored procedure.
In Hour 6, “Retrieving Data from the Data Source,” you saw how to create Connection, Command, and DataReader objects and use them to retrieve data from your database. As you recall, the ExecuteReader() method of the DataReader object returns a forward-only, read-only resultset, which you can then use to bind to a list control, or step through manually.
Almost precisely the same code can be reused to call a stored procedure. Rather than placing a query into the Command object, you ...
Read now
Unlock full access