本帖最后由 lxh524 于 2011-01-08 17:15:06 编辑

解决方案 »

  1.   

      问题解决了。测试代码如下:希望对大家有用。  if not self.OraStoredProc1.Active then self.OraStoredProc1.Open;  if self.OraStoredProc1.ParamByName('aa').AsCursor.CanFetch then begin
        self.OraQuery1.Cursor:=self.OraStoredProc1.ParamByName('aa').AsCursor;
        self.OraQuery1.Open;
      end;  if self.OraStoredProc1.ParamByName('ab').AsCursor.CanFetch then begin
        self.OraQuery2.Cursor:=self.OraStoredProc1.ParamByName('ab').AsCursor;
        self.OraQuery2.Open;
      end;
      

  2.   

    sys_refcursor就是一个返回的结果集
      

  3.   

    其实问题还没有根本上解决,当去一条记录的时候,这个oraquery还是取不到。不知道为啥取1000条记录又可以正常获取。这个还是很大的疑问。希望有人能解决。现在是没时间用存储过程返回游标的写法来处理问题了。只能换一种写法,感觉有点杯具,这可是odac专门连接oracle数据库组建,连这中sys_refcursor类型的有数据集多处理不了。忧伤