Executing Oracle functions

By: Quinn Wildman

Abstract: Functions can be executed via a Stored Proc

Can I execute an Oracle User Function via a Stored Proc?

Yes. There are a number of things to remember about this process:

  1. Functions cannot be dragged and dropped from SQL Explorer like procedures can.

  2. The first parameter in the parameter list (parameter 0) is the return value of the function. The DataType should match the return data type of your function. The name must be Result. The ParamType must be ptResult.

  3. If you are creating a TStoredProc dynamically Prepare does not automatically load function parameters with BDE 5.10 like it did with previously with older versions of the BDE. You'll have to use TStoredProc.Params.CreateParam to add all parameters to your TStoredProc.

Server Response from: ETNASC01