RTI_Verify_Proc Function
Description
This function checks to see if the passed stored procedure or event name is valid, and optionally checks to see if it takes a minimum number of parameters.
Syntax
IsValid = RTI_Verify_Proc( ProcID, IsEvent, MinParams )
Parameters
The function has the following parameters:
Parameter | Description | |
---|---|---|
ProcID [Required] | Contains the name of the stored procedure or event to check. When searching for a stored procedure the normal application inheritance chain is respected unless the ProcID is suffixed with a specific Application ID, in which case no resolution is performed. e.g. "MYPROC" Searches the inheritance chain "MTPROC*EXAMPLES" Only checks the EXAMPLES app to see if MYPROC exists | |
IsEvent [Optional] | If set to TRUE$ (1) then ProcID is assumed to be a key to the SYSREPOSEVENTEXES table, i.e: <appID> "*" <eventID> "*" <objectID> | |
MinParams [Optional] | When passed this specifies the minimum number of parameters that the procedure or event must support to be considered valid. |
Returns
If the procedure or event exists and matches the minimum number of parameters (if specified) then the return value is 1 (TRUE$), otherwise 0 (FALSE$) is returned. Detailed error information is returned via Set_Status().
Remarks
The verification process uses the RTI_Get_Proc_Info function internally and verified items are cached for performance reasons.
See Also
Example
// Example: Check that the MYPROC function exists and that it // takes two arguments Declare Function RTI_Verify_Proc $Insert Logical IsValid = RTI_Verify_Proc( "MYPROC", FALSE$, 2 )