Creating a prototype procedure

When creating the prototype procedure for a stored procedure, you should follow these steps.

  1. Name the procedure.

The name of the procedure must be exactly the same as the name of the stored procedure. The procedure name is case sensitive, and must be unqualified (not include the name of the database in which the stored procedure resides).

  1. Indicate what the stored procedure will return.

The first non-comment line of the prototype procedure must be:

sproc returns long variable;

where variable is a long integer that will contain the return value from the stored procedure.

  1. List the remaining parameters.

The remaining parameters in the procedure must be listed in the order in which they are declared in the stored procedure. Their data types must be the Dexterity equivalents of the SQL data types used in the stored procedure. Depending upon the stored procedure’s parameter set, you may need to specify several in and inout parameters.

Since you are passing parameters from script to script, you should be declaring in and inout parameters only. Out parameters can’t be passed out of a script.

  1. Add the remaining statements to the procedure.

Add the call sproc statement to the script. Be sure that the name of the stored procedure is enclosed in double quotes.

  1. Compile and close the procedure.

Once you’ve completed the procedure, click Compile to save the prototype procedure and check for errors. If no errors occurred, click Close to close the Script Editor.

Documentation Feedback