Receive Cursor Parameter

Receive Cursor Parameter

Postby 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
Maher
maher
 
Posts: 1
Joined: Thu 01 Sep 2005 18:50

Postby 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();
          cmd.ExecuteNonQuery();
          oracleDataAdapter1.Fill(ds, ((OracleCursor)cmd.Parameters["pcur"].OracleValue));
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for Oracle