Receive Cursor Parameter

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 1
Joined: Thu 01 Sep 2005 18:50

Receive Cursor Parameter

Post by maher » Thu 01 Sep 2005 18:55

I have a stored procedure that returns a "cursor" parameter. What do I need to do on C# side to retrieve this parameter.

Thank You in Advance

Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 02 Sep 2005 09:34

You can use OracleCommand with stored procedure call in conjunction with OracleDataAdapter component and fill any DataSet as usual.
You can receive OracleCursor value from executed OracleCommand and receive OracleDataReader as described below

Code: Select all

OracleParameter p;
OracleDataReader r = ((OracleCursor)p.OracleValue).GetDataReader();
You can fill DataSet from any OracleCursor object as described below

Code: Select all

          DataSet ds = new DataSet();
          oracleDataAdapter1.Fill(ds, ((OracleCursor)cmd.Parameters["pcur"].OracleValue));

Post Reply