PB9+SQL2008的问题
现有一个SQL2008存储过程如下,输入@x,@y
返回 一个结果集,一个output参数,一个return参数.
alter proc sp111 ( @x int, @y int, @z int output ) as begin declare @r int select @z=@x+@y,@r=@x-@y select @x*1 col union all select @y*1 col union all select @z*1 col return @r end
integer valx,valy,valz,valr,valo;valx=integer(sle_1.text);valy=integer(sle_2.text);lb_1.reset();lb_2.reset();declare spsub procedure for dbo.sp111 @x=:valx,@y=:valy,@z=:valz output;execute spsub;fetch spsub into :valz;do while SQLCA.SQLCode=0 lb_1.additem(string(valz)); fetch spsub into :valz;loopfetch spsub into :valr,:valo;sle_3.text=string(valr);if SQLCA.sqlcode=-1 then sle_3.text=sle_3.text+"_"+string(SQLCA.sqlerrtext);end ifclose spsub;