Help using TOracleObject

IgorZ

Member
We have an Oracle 9i function with IN parameter of type TABLE (TYPE TSET AS TABLE OF NUMBER) and need to pass this parameter from Delphi. The code is:
MyIdObj := TOracleObject.Create(PrintSession, 'TSet', '');
MyIdObj.Elements[0] := Value1;
MyIdObj.Elements[1] := Value2;
...
Now I am trying to call the function this way:

Result := PrintPackage.CallIntegerFunction('MY_FUNCTION',[MyIdObj]); // we get an error "Incompatible types Variant and TOracleObject"

or this way:

Result := PrintPackage.CallIntegerFunction('MY_FUNCTION',[MyIdObj.Elements]); // we get an error "'[' expected, but ',' found"

Could you suggest me, please, which technics can I apply to get the desired result.

Thank you.
 
This is not possible with the TOraclePackage component. It only supports scalar data types. You can use the TOracleQuery instead, or use the Package Wizard to generate a class to encapsulate the package.
 
Back
Top