- Diego A Villegas R
- PowerBuilder
- Wednesday, 8 January 2020 06: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;
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.