Data Access: Using Stored Procedures

This application demonstrates how to programmatically create and use stored procedures with ADO .NET and Microsoft SQL Server. The use of a query (a.k.a., stored procedure) in a Microsoft Access database is also demonstrated.

Featured Highlights

Requirements

This application requires the release version of Visual Studio .NET Professional (or greater) and access to the Northwind database residing in SQL Server or the Microsoft Data Engine (MSDE). To install MSDE, do the following:

1. Open the Start menu, click Programs, click Microsoft .NET Framework SDK, and then click Samples and Quickstart Tutorials.

2. Click "Step 1: Install the .NET Framework Samples Database".

3. Open a command window, and CD to \Samples\Setup This is typically : C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Setup

4. Type: osql -E -S (local)\NetSDK -i InstNwnd.sql

Running the Sample

Simply press F5.

Other links:

HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual Basic .NET (Q308049)

PRB: Output Parameters Are Not Returned When You Run an ADO.NET Command in Visual Basic .NET (Q308051)