DECLARE lsp_get PROCEDURE ...FAILING
- New
- Issue
-
Anil Rao
- PowerBuilder
- Friday, 17 April 2026 05:35 PM UTC
we are migrating from PB 2025/Sybase to PB 2025/MS SQl Server.
We have the below code in Sybase running fine:
DECLARE lsp_get_instr PROCEDURE FOR ctp_get_cur_cs_def_instr
@a_retval_out = 0 OUTPUT,
@a_message_out = "" OUTPUT,
@a_parms_out = "" OUTPUT,
@a_instr_code = 0 OUTPUT,
@a_amend_nbr = 0 OUTPUT,
@a_case_nbr = :al_case_nbr,
@a_person_nbr = :sl_defendant_nbr using gnv_app.itr_vc;
But fails in MS SQL with the
.
Researched & found that SQl Server does't like to give constants as OUTPUT. So changed to
ll_retVal_out = 0
ls_msg_out = ''
ls_parms_out = ''
ll_instr_code = 0
ll_amend_nbr = 0
DECLARE lsp_get_instr PROCEDURE FOR ctp_get_cur_cs_def_instr
@a_retval_out = :ll_retVal_out OUTPUT,
@a_message_out = :ls_msg_out OUTPUT,
@a_parms_out = :ls_parms_out OUTPUT,
@a_instr_code = :ll_instr_code OUTPUT,
@a_amend_nbr = :ll_amend_nbr OUTPUT,
@a_case_nbr = :al_case_nbr,
@a_person_nbr = :sl_defendant_nbr using gnv_app.itr_vc;
But I am still getting the same error.
The SP also has a RETURN value in addition to the OUTPUT vals
PL. HELP!!
We may have many like this. Should we fix in all places or can this be controlled via DBParm?
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.