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.
To create the Procedure object in the object navigator:
In the web application click the Create button in the main menu and select the object type on the New Object side panel.
In the desktop application:
Select the Create > Other > Procedure context menu item.
Select the New Object > Other > Procedure item in the Create group on the Home ribbon tab.
After executing one of the operations, the procedure creation wizard opens containing the pages:
Basic Settings/Basic Properties. It is used to set object name, identifier and comment.
Parameters. The list of parameters, which will be used in the procedure code, is set. A role in procedure code is defined for each parameter.
Procedure/Function. It sets up the procedure, determines its type and executed script.
NOTE. Creating of procedures and functions is unavailable in SQLite DBMS and HP Vertica DBMS because such object type is missing in these DBMS.
If the repository 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 one can 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