1. Diego A Villegas R
  2. PowerBuilder
  3. Wednesday, 8 January 2020 18:33 PM UTC

SQLCA.DBMS = " JDBC"
SQLCA.LogPass = password
SQLCA.LogId = user
SQLCA.AutoCommit = False
SQLCA.DBParm = "URL='jdbc:oracle:thin:@10.02.30.201:1521:BD',Driver='oracle.jdbc.driver.OracleDriver'"

Connection  jdbc

procedure oracle

create or replace PROCEDURE admin.p_prueba(an_param IN NUMBER)
IS

BEGIN
      update recaudo
        set nro_tramite = an_param
        where id_solicitud = 20867111;
      commit;
END ;

synonym public

CREATE PUBLIC SYNONYM p_prueba FOR admin.p_prueba;

code powerbuilder:

when invoking with schema the process is successful:
STRING LS_SENTENCIA
LS_SENTENCIA =  "EXECUTE admin.p_prueba AN_PARAM = 1 ";

execute immediate  :LS_SENTENCIA using sqlca;


occurs when invoked through the synonym.
STRING LS_SENTENCIA

LS_SENTENCIA =  "EXECUTE p_prueba AN_PARAM = 1 " ;

execute immediate  :LS_SENTENCIA using sqlca;

ERROR:
"AN_PARAM is not a parameter for procedure P_PRUEBA."

occurs when invoked through the synonym.

What causes this error?

note:
when a procedure without arguments is invoked through synonym, the process is correct.
example: (without scheme)
 LS_SENTENCIA =  " EXECUTE p_prueba " ;
 execute immediate  :LS_SENTENCIA using sqlca;



There are no replies made for this question yet.
However, you are not allowed to reply to this question.