再问存储过程问题
create procedure dba.gongjijin(@yf_salary decimal(5,2),@gongjijin decimal(4,2) output)
as
begin
select @gongjijin=@yf_salary*.1
end;
脚本:
int ls_code
decimal ld_tempout
DECLARE gongjijin PROCEDURE FOR proc_gongjijin
@yingfa=10000,@gongjijin=:ld_tempout using sqlca;
sqlca.autocommit = true
execute gongjijin;
if sqlca.sqlcode =0 then
messagebox("info","ok")
fetch gongjijin into :ld_tempout;
close gongjijin;
else
ls_code=sqlca.sqlcode
end if
sqlca.autocommit =false
st_2.text=string(ld_tempout)
调试时ls_code=-1,st_2.text=0应该=1000.我看不出哪里有错呀!帮帮忙,指点指点,不会忘记加分的。