Using the Result Parameter

From InterBase

Go Up to Understanding Stored Procedure Parameters


In addition to returning output parameters and a dataset, some stored procedures also return a single result parameter. The result parameter is usually used to indicate an error status or the number of records processed base on stored procedure execution. See your database server’s documentation to determine if and how your server supports the result parameter. Result parameters are not assigned values except by the stored procedure and then only after the stored procedure has been executed. Inspect a result parameter from an application to retrieve its value after invoking the TIBStoredProc.ExecProc method.

Use the TIBStoredProc.Params property or TIBStoredProc.ParamByName method to reference the TParam object that represents the result parameter and inspect its value.

DateVar := StoredProc1.ParamByName('MyOutputParam').AsDate;

Advance To: