The OleDb Namespace and Stored Procedures

In this section, you'll investigate the three stored procedures that use the OleDb namespace. You'll use the three stored procedures you added to the Northwind database from a demonstration page. You'll see how to supply parameter values, as well.

Retrieving a List of All Employees

To demonstrate calling stored procedures from your ASP.NET applications, start out by investigating the EmpLoad procedure (in EmployeeSP.aspx.vb), which calls the EmployeeList stored procedure. Listing 15.4 shows the complete EmpLoad procedure.

Listing 15.4. Call a Stored Procedure to Fill a DataSet
 Private Sub EmpLoad() Dim ds As DataSet Dim da As OleDbDataAdapter Dim strSQL As String Dim strConn As String strConn = Session("ConnectString").ToString() ...

Get ASP.NET Developer's JumpStart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.