I have a requirement to call PL/SQL stored procedure from Oracle Call interface program by passing named parameters. How to do that ?
Suppose I have a procedure
PROCEDURE MY_SWAP(X IN OUT NUMBER,Y IN OUT NUMBER) AS T NUMBER;
BEGIN
T := X;
X := Y;
Y := T;
END MY_SWAP;
/
I can call the procedure from sqldeveloper as follows by passing as named parameters.
MY_SWAP(Y=>B, X=>A);
Right now I am using the following. Using OCIBindByPos() to pass parameters in defind order in the declaration.
OCIStmtPrepare(...)
OCIBindByPos()
OCIStmtExecute()
OCIStmtFetch()
How to call the procedure with Oracle Call INterface to pass parameters as named parameters?