0 0000000$ Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-11 #1 procedure AAA(theid in number,c1 in out ref cursor,c2 in out ref cursor) 怎么用ADO取出C1,C2的记录集
0 0000000$ Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #2 没人回答吗?[?][?][?][?][?][?][?][?][?][?][?][?][?][8D] 自己up
J jrq Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #4 是要同时返回C1,C2结果吗? 还是根据你传入的theid in number来判断返回C1或C2?? 最好把存储过程的实现代码也贴出来。 另,你的DB是___?
0 0000000$ Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #5 谢谢两位的回复!!!!!!!! 同时返回记录集。 关于过程我给个示例: procedure AAA(theid in number,c1 in out ref cursor,c2 in out ref cursor) begin open c1 for select col1,col2,col3,...coln from table1; open c2 for select col1,col2,col3,...coln from table2 where otherid=c1.col3; end; 数据库是 oracle 8
谢谢两位的回复!!!!!!!! 同时返回记录集。 关于过程我给个示例: procedure AAA(theid in number,c1 in out ref cursor,c2 in out ref cursor) begin open c1 for select col1,col2,col3,...coln from table1; open c2 for select col1,col2,col3,...coln from table2 where otherid=c1.col3; end; 数据库是 oracle 8
L lgsnake Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-31 #6 如下: CREATE PROCEDURE RaiseSalary @percentage int, @RecCount int OUTPUT AS begin update ADOTestDatas set Salary = Salary + Salary * (@percentage / 100) set @RecCount = @@rowcount end //存储过程 //调用如下 procedure TForm1.Button2Click(Sender: TObject); begin adospTest.Parameters.ParamByName('@percentage').Value := 1; adospTest.Parameters.ParamByName('@RecCount').Value := 0; adospTest.ExecProc; edtOut.Text := IntToStr(adospTest.Parameters.ParamByName(@RecCount).Value);//在此 adodsTest.Refresh; end ;
如下: CREATE PROCEDURE RaiseSalary @percentage int, @RecCount int OUTPUT AS begin update ADOTestDatas set Salary = Salary + Salary * (@percentage / 100) set @RecCount = @@rowcount end //存储过程 //调用如下 procedure TForm1.Button2Click(Sender: TObject); begin adospTest.Parameters.ParamByName('@percentage').Value := 1; adospTest.Parameters.ParamByName('@RecCount').Value := 0; adospTest.ExecProc; edtOut.Text := IntToStr(adospTest.Parameters.ParamByName(@RecCount).Value);//在此 adodsTest.Refresh; end ;
0 0000000$ Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-01 #9 谢谢lgsnake 老兄,看清楚了,是游标,不是变量!!