Hello friends!
I'm trying to study stored procedures. So I've got such function:
(code entered in Sybase Central, function created successfully)
CREATE FUNCTION "DBA"."TestF"( /* parameters,... */ )
RETURNS integer
BEGIN
DECLARE res integer;
SET res = 14;
RETURN (res);
END
Then I coded in PowerBuilder:
integer Res
DECLARE emp_proc PROCEDURE FOR TestFunk;
EXECUTE emp_Proc;
FETCH emp_Proc INTO :Res;
MessageBox('Result', string(Res))
You may guess that MessageBox shows the zero result. What is my mistake? How to put the result into Res?
Thank you!!!
I'm trying to study stored procedures. So I've got such function:
(code entered in Sybase Central, function created successfully)
CREATE FUNCTION "DBA"."TestF"( /* parameters,... */ )
RETURNS integer
BEGIN
DECLARE res integer;
SET res = 14;
RETURN (res);
END
Then I coded in PowerBuilder:
integer Res
DECLARE emp_proc PROCEDURE FOR TestFunk;
EXECUTE emp_Proc;
FETCH emp_Proc INTO :Res;
MessageBox('Result', string(Res))
You may guess that MessageBox shows the zero result. What is my mistake? How to put the result into Res?
Thank you!!!