Option ProcNamedParams in TOraStoredProc

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cstabile
Posts: 1
Joined: Wed 29 Aug 2018 11:51

Option ProcNamedParams in TOraStoredProc

Post by cstabile » Wed 29 Aug 2018 12:09

Hello,

How does the ProcNamedParams option works in TOraStoredProc?

I did not find in the documentation.

Tks!!

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Option ProcNamedParams in TOraStoredProc

Post by MaximG » Mon 10 Sep 2018 06:43

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.

Post Reply