Running a Stored Procedure

You can run a stored procedure against your database to execute the SQL statements it contains and display the results in the Output window.

To run a stored procedure

  1. In Data View, expand the Stored Procedures folder.

  2. Right-click the name of the stored procedure that you want to run.

  3. Choose Execute from the shortcut menu. The Output window shows the status of the stored procedure.

  4. If the stored procedure contains parameters, the Run Stored Procedure dialog box prompts you for their values. In the Value column, type a value for each parameter that appears in the Name column, and then choose OK. For details about parameters, see Using Parameters in Stored Procedures.

The Output window is updated with status information as the stored procedure is run. The Output window also displays result sets and return values for the stored procedure. If any errors occurred during this process, the Server Errors dialog box displays a list of errors.

Note   Microsoft® Visual Basic™ does not support executing stored procedures from the Data View window.