I’m getting this error in a pb script in PB12, but not in
PB9. Details below Li_rv is declared as an integer in my script. Can someone tell me what to change to get this to run?
SQLSTATE = 42000
Microsoft SQL Native Client
Must declare the scalar variable "@li_rv".
This is the point at which the error occurs.
SQLDA.SetDynamicParm(1, ldc_reserve_id)
EXECUTE DYNAMIC
stu_sp_waitlist USING DESCRIPTOR SQLDA;
This is the setup prior to the execute.
Integer li_rv
DECLARE stu_sp_waitlist DYNAMIC PROCEDURE FOR SQLSA;
ls_sqlsa = "execute @li_rv = stu_sp_waitlist
@an_ReserveID=?"
PREPARE SQLSA FROM :ls_sqlsa USING SQLCA;
DESCRIBE SQLSA INTO SQLDA;
Here is the declaration of the procedure.
create proc
dbo.Stu_sp_Waitlist (@an_ReserveID, numeric(10))
as
declare @errno int,
@li_Enrolled int,
@li_MaxEnrolled int,
@li_Auditing int,
@li_MaxAudit int
/*