delphi调用存储过程的问题,菜鸟第一次调存储过程(20分)

Z

zybzhen

Unregistered / Unconfirmed
GUEST, unregistred user!
我的oracle存储过程,oracle 9<br>create or replace procedure getLogRows( <br>&nbsp; &nbsp; &nbsp; &nbsp;in_srq in VARCHAR2,in_erq in VARCHAR2, <br>&nbsp; &nbsp; &nbsp; &nbsp;out_sage out NUMBER <br>) <br>is <br>begin <br>&nbsp; &nbsp; &nbsp; select <br>&nbsp; &nbsp; &nbsp; count(*) into out_sage <br>&nbsp; &nbsp; &nbsp; from Logs <br>&nbsp; &nbsp; &nbsp; where LogTime &gt; to_Date(in_srq,'yyyy-mm-dd') and LogTime &lt; to_Date(in_erq,'yyyy-mm-dd'); <br>return; <br>end getLogRows;<br>我的delphi代码:<br>adostoredproc1.Prepared := false;<br>adostoredproc1.Parameters.ParamByName('in_srq').Value := '2008-01-01';<br>adostoredproc1.Parameters.ParamByName('in_erq').Value := '2008-03-30';<br>adostoredproc1.Prepared := true;<br>adostoredproc1.ExecProc;<br><br>请指教我该怎么 获得 返回值 ?
 
你的OUT参数都没有货得值,怎么可能有返回值呢。。。。。。。。。。。。。。。。out_sage out NUMBER
 
我的out参数在调试的时候可以或得值<br>我问得是怎在程序中或者值,嘿嘿
 
没用过oracle,只知道sql server中类似select count(*) into out_sage 。。。的代码,结果是产生了out_sage 的数据表,而不是变量。仅供参考。
 
多人接受答案了。
 
顶部