Microsoft KB Archive/301072

= How To Create, Edit, and Execute Stored Procedures in Visual InterDev =

Article ID: 301072

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 64-bit Edition
 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q301072



IN THIS TASK
SUMMARY Requirements
 * Create a New Project in Visual InterDev
 * Add a New Stored Procedure
 * Edit a Stored Procedure
 * Execute a Stored Procedure



SUMMARY
This article shows how to create, edit, and execute stored procedures in SQL Server by using Visual InterDev 6.0.

Note that you can use the DataView window in Visual InterDev if you do not have SQL Server Enterprise Manager to edit your stored procedures.

back to the top

Requirements

 * Visual InterDev 6.0 Enterprise Edition
 * SQL Server 7 or later

back to the top

Create a New Project in Visual InterDev

 * 1) From the Visual InterDev File menu, click Project.
 * 2) In the Project Explorer window, right-click the Global.asa file, and then click Add data connection.
 * 3) In the Data Link Properties dialog box, enter connection information for your SQL Server server, and then click Test connection.
 * 4) From the View menu, click Other Windows and then click Data View.
 * 5) In the Data View window, expand the database, and then expand Stored Procedures.

back to the top

Add a New Stored Procedure

 * 1) In the Data View window, right-click Stored Procedures and then click New stored procedure from the context menu.
 * 2) Create a Stored Procedure by using the template provided in the window.NOTE: You can instead use Query Builder to build the SQL statement for a stored procedure by right-clicking in the window and selecting Insert SQL.


 * 1) * To add tables to Query Builder, drag tables from the DataView window to the top pane of the Query Builder window.
 * 2) * To test the stored procedures in the query builder window, from the Query menu, click Run.
 * 3) From the File menu, click Save  .

back to the top

Edit a Stored Procedure

 * 1) Expand Stored Procedures in the Data View window.
 * 2) Right-click the stored procedure that you want to edit, and then click Open from the context menu. Make the necessary changes.

NOTE: You can instead invoke the Query Builder to edit a stored procedure by selecting the query under Stored procedures in the Data View window and then clicking Edit SQL.
 * 1) From the File menu, click Save  .

back to the top

Execute a Stored Procedure

 * 1) Expand Stored procedures in the Data View window.
 * 2) Right-click a stored procedure, and then click Execute from the context menu.

If the stored procedure requires input parameters, enter them into the Execute dialog box that appears. The results of the stored procedure will be displayed in the Output window.

NOTE: You can instead use the Query Builder window to execute the stored procedure. To do so, open the Query Builder and then from the Query menu, click Run.

back to the top

Keywords: kbhowtomaster KB301072

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.