有谁帮忙:存储过程的返回值 (50分)

Q

qzzwg

Unregistered / Unconfirmed
GUEST, unregistred user!
因为是初学者,手头资料少,请问如何获得adostoredprocr的返回值,数据库是sql server
dh:=dm.qushoufei.fieldbyname('dh').AsString;
dm.adostoredproc.Parameters[2].Value:=dh;
dm.adostoredproc.ExecProc;
getscbh:=获得返回值,这句怎样写?

 
存储过程中定义输出参数 create procedure procname( @getscbh char(20) output .....)
结束前赋值 select @getscbh=。。。。
。。。
dm.adostoredproc.ExecProc;
getscbh:=dm.adostoredproc.Parameters.parambyname('@getscbh ').AsString;
 
dh:=dm.qushoufei.fieldbyname('dh').AsString;
dm.adostoredproc.Parameters[2].Value:=dh;
dm.adostoredproc.ExecProc;
getscbh:=dm.adostoredproc.Parameters.Value;
 
多人接受答案了。
 
顶部