The Procedure object enables the user to create procedures and functions for various DBMS.
Unlike the DBMS command, a stored procedure or function is created on the server when the Procedure object is created in the repository. Several repository procedures may refer to the same stored procedure on database server. Changes in text of a stored procedure affect all objects referring to this procedure. The result of a procedure is the number of processed records, or some specific value if a function is created instead of a procedure.
NOTE. It is available to create and work with procedures only in the desktop application.
To create a Procedure object, open the object navigator and select the following:
The Create > Other > Procedure context menu item.
The New Object > Other > Procedure item in the Create group on the Home ribbon tab.
After executing one of the operations, a procedure creation wizard opens containing the following pages:
Basic Properties. Object name, identifier and comment are set.
Parameters. The list of parameters, which will be used in the procedure code. Role in procedure code is defined for each parameter.
Procedure/Function. Sets up the procedure, determines its type and the executed script.
To start the selected procedure:
Select the Open context menu item.
Select the View item on the Home ribbon tab.
Double-click it.
NOTE. Creating of procedures and functions is not available in SQLite DBMS because such object type is missing in this DBMS.
If the repository is connected to version control system, the procedure can be added to the system to control changes in its version. To do this, select the Add to VCS context menu item for the procedure in the object navigator. After adding the object to VCS server it is available to track its changes. Version control system stores procedure text and parameter settings. For details about working with objects added to the version control system, see the Developing Applications in a Team section.
See also:
Example of Creating a Procedure | Data Handlers in DBMS | IProcedure