Page 1 of 1

Option ProcNamedParams in TOraStoredProc

Posted: Wed 29 Aug 2018 12:09
by cstabile
Hello,

How does the ProcNamedParams option works in TOraStoredProc?

I did not find in the documentation.

Tks!!

Re: Option ProcNamedParams in TOraStoredProc

Posted: Mon 10 Sep 2018 06:43
by MaximG
The OraStoredProc.Options.ProcNamedParams option is required for using Positional or Named parameter Notation when calling a stored PL/SQL object. Thus, when OraStoredProc.Options.ProcNamedParams = False Positional Notation will be used :

Code: Select all

  ...
  OraSession.ExecSQL('CREATE OR REPLACE PROCEDURE NULLPROC(PARAM1 IN VARCHAR2, PARAM2 OUT INTEGER) IS BEGIN  NULL; END NULLPROC;');
  OraStoredProc.Options.ProcNamedParams := False;
  OraStoredProc.StoredProcName := 'NULLPROC';
  OraStoredProc.Execute;
  ...
begin
NULLPROC(:PARAM1, :PARAM2);
end;

When OraStoredProc.Options.ProcNamedParams = True, the call will be as follows :

begin
NULLPROC(PARAM1 => :PARAM1, PARAM2 => :PARAM2);
end;

We will describe the behavior of the OraStoredProc.Options.ProcNamedParams option in our documentation in the next build of our product.