新手提问 关于PB中怎么调用存储过程(入门例子)

新手提问关于PB中如何调用存储过程(入门例子)declare getinfo1 procedure for getinfo // 定义过程调用 s

新手提问 关于PB中如何调用存储过程(入门例子)
declare getinfo1 procedure for getinfo ;// 定义过程调用 
sqlca.autocommit = true 

execute getinfo1;//执行过程,这里是不需要其他参数的 
if sqlca.sqldbcode <> 0 then
messagebox("","不成功")
rollback;
else
messagebox("","成功")
commit;
end if
close getinfo1;// 关闭调用 


运行后提示“不成功”,请问高手错在哪里,谢谢
[解决办法]

declare getinfo1 procedure for getinfo ;// 定义过程调用  
sqlca.autocommit = false  

execute getinfo1;//执行过程,这里是不需要其他参数的  
if SQLCA.sqlcode = -1 then
messagebox("","不成功")
rollback;
else
messagebox("","成功")
commit;
end if
close getinfo1;// 关闭调用  




[解决办法]
declare getinfo1 procedure for getinfo ;// 定义过程调用  
sqlca.autocommit = false  

execute getinfo1;//执行过程,这里是不需要其他参数的  
if SQLCA.sqlcode = -1 then
messagebox("","不成功"+'~r~n'+SQLCA.SQLErrText)
rollback;
else
messagebox("","成功")
commit;
end if
close getinfo1;// 关闭调用  
看看SQLCA.SQLErrText是什么.
[解决办法]
测试了 成功