The Properties screen for procedures and scripts is the same. A procedure can be renamed by changing the name field.
If a procedure is renamed, then it is also necessary to change the procedure name within the actual code. The Purpose and Owner fields are purely informational.
In the above example, the Delete Lock option is not selected. Selecting this check box prevents the procedure from being deleted through the Delete menu option. It also prevents the procedure from being overwritten, if a new procedure generation is requested.
Selecting the Lock Storage Location option enables you to retain the current location of the procedure, e.g. no changes will occur if the Target location of the procedure is manually changed, and a Rebuild or Regenerate operation is performed via the Table's Properties window or from the Table's right click Code context menu.
In the above example, the procedure is currently being edited, and is shown as Locked for Edit by "WhereScape Documentation". If procedures or scripts have already been opened for editing, they can only subsequently be opened for viewing.
Check out and delete operations for procedures and scripts, as well as the regeneration and drop of procedures are not permitted; if the object is currently Locked For Edit by another user.
- The Release Edit Lock button to the right of the edit lock message, enables the edit lock to be cleared. If WhereScape RED, the database or the PC crashes when a procedure is open, then the check out must be cleared through this screen.
- The Edit Lock Reason is for information only, and can be used as another comment field if desired.
- The Type drop-down list provides the selection of Block, Function or Procedure:
- Selecting a type of Block enables you to execute a SQL block against another connection.
- The Connection Name drop-down field enables you to select the connection against which the SQL block is executed.
- The Lock Connection checkbox displays next to the Connection Name option, enabling locking the selected connection.
For Procedure or Function type, the Connection Name drop-down field enables you to select the connection against which a procedure or function is executed and the target database where the update procedure or function is stored, via the Target Name drop-down field.
Selecting the Lock Storage Location option in the procedure Properties window enables you to retain the current location of the procedure, if the Target location of the procedure is manually changed and Rebuild or Regenerate operation is performed, via the Table object's Properties window or from the Table object's right-click Code context menuRefer to Procedure Migration for details.