银
银雨辰
Unregistered / Unconfirmed
GUEST, unregistred user!
给你个例子:<br>CREATE OR REPLACE PACKAGE BODY PKG_JCCTEST1 <br>AS<br>procedure GetSubAndSum2(p1 number,p2 number ,<br>ResultCursor out rc_class)<br>IS<br>BEGIN<br>open ResultCursor for<br>select p1-p2 as "sum", p1+p2 as "sub" from dual;<br>END ;<br><br>AdoQuery1.Close ;<br>AdoQuery1.Parameters.Clear ;<br>AdoQuery1.SQL.Clear ;<br>AdoQuery1.SQL.Add('{call PKG_JCCTEST1.GetSubAndSum2(?,?)}') ;<br>AdoQuery1.Parameters.CreateParameter('P1',ftinteger,pdinput, 50,25) ;<br>AdoQuery1.Parameters.CreateParameter('P2',ftinteger,pdinput, 50,22) ;<br>AdoQuery1.Open ;<br>Showmessage(string( AdoQuery1.FieldByName('sub').Value)+'-'+<br>string( AdoQuery1.FieldByName('sum').Value));