Y
ygw531
Unregistered / Unconfirmed
GUEST, unregistred user!
如题:<br>(一):存储过程样式一:<br>Create Or Replace Package lzuser.pkg_proc{建包}<br>As<br> Type proc_cur Is Ref Cursor;<br> Procedure GetData(Data_cur Out pkg_proc.proc_cur);<br>End pkg_proc;<br><br><br>Create Or Replace Package Body lzuser.pkg_proc{包体}<br>As<br> Procedure GetData(Data_cur Out pkg_proc.Proc_cur)<br> Is<br> Begin<br> Open Data_cur For <br> Select "Name" As TotalType,'1' As TotalNum From lzuser."B_Company";<br> End GetData;<br>End pkg_proc; <br><br>像(一)一样的存储过程过ADO怎么调用?<br><br>(二)存储过程样式二:<br>create or replace package lzuser.CurType{包}<br>is<br>type Cur_Type is ref cursor;<br>end;<br><br><br>CREATE OR REPLACE Procedure LZUSER.Get_B_Company{存储过程}<br> ( RecCur Out Lzuser.CurType.Cur_Type)<br>As<br> SqlStr Varchar2(2000);<br>Begin<br> SqlStr :='Select "Id","Name","AreaName","Tel","Linkman","Leader","LeaderTel","Address","Remark" From lzuser."B_Company"';<br> Open RecCur For<br> SqlStr;<br>End ;<br>像二一样的存储过程又该如何调用?<br>这两者有什么区别吗?<br><br>请各位大侠帮忙看看,小弟首次使用Oracle,在此诚心请教。望各位赐教。