TOraclePackage->CallProcedure C++

DFalc

Member
Hi All!
void __fastcall CallProcedure(const AnsiString ProcedureName, const Variant * Parameters, const int Parameters_Size)
What is Parameters_Size?
I try pCF->CallProcedure("a", &Variant(20), 0); - don't work?
Help me please. Thank you.
 
The open array constructor in Delphi can be simulated in C++Builder by the EXISTINGARRAY macro. This implicitly sets the size parameter. For example:
Code:
{
  AnsiString Result;
  Variant Params[] = {10, "SMITH"};
  Result = MyPackage->CallStringFunction("MyFunction", EXISTINGARRY(Params));
}

------------------
Marco Kalter
Allround Automations
 
Code:
{
  AnsiString Result;
  Variant Params[] = {10, "SMITH"};
  Result = MyPackage->CallStringFunction("MyFunction", EXISTINGARRY(Params));
}

This gives 2 parameters (10 and "SMITH") to the function MyFunction (right?). What happens, if the function uses IN/OUT parameters? How can I get the writeback parameters results?
 
You can use the TOraclePackage->GetParameter function after calling the packaged program unit to obtain the value of an output parameter.

The most elegant way to use packages is by using the Package Wizard though, this will generate a class with corresponding functions that you can simply call in C++ (or Delphi). The output parameters of the packaged program unit will be output parameters of the corresponding function of this class.

------------------
Marco Kalter
Allround Automations
 
Back
Top