TCustomOraPackage.ExecProc Method

Calls the stored procedures defined for a given package.




procedure ExecProc(const Name: string); overload;function ExecProc(Name: string; const Params: array of variant): variant; overload;

Holds the name of the stored procedure.
holds the parameter values array.
Return Value
a result, if a stored procedure is a function, Null otherwise.


Call the ExecProc method to call the stored procedures defined for a given package. The Name parameter is a name of a stored procedure.

If a stored procedure accepts or returns parameters they must be supplied in the Params array in exactly the same order and number as they appear in the declaration of this stored procedure. If the value for an input parameter was not included in the Params array, the parameter default value is taken. Only the parameter values at the end of the list may be unincluded to the parameter values array. If the parameter has no default value, the NULL value is sent.

For example, the following is a stored procedure declaration in package DBMS_ALERT:

    name       IN   VARCHAR2,
    message   IN   VARCHAR2);

it may be called with this code:

MyOraPackage.ExecProc('SIGNAL', ['MySignalName', 'MyMessage']);

This is different from the way ExecProcEx is used.

Note: Stored functions unlike stored procedures return result values. To understand the parameters usage see TCustomDAConnection.ExecProc.

See Also

© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback