Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NULL values in RefCursor?

375677Dec 19 2002 — edited Dec 20 2002

Hello,

There seems to be an issue with the RefCursor type that contains a NULL value. We wrote code that calls a stored procedure that uses the RefCursor as an output parameter. Everything goes well when we read the values until we hit a record that has a NULL value in it. Then the C# application throws the following exception:

"Column contains NULL data"

I do not understand what possibly could be a problem with a column that has NULL data in it. Is it not permitted to return nulls? Are nulls not a valid data type? Is it possible to set some sort of property that would allow us to read nulls from a RefCursor?

Here is the code that does it. The reader throws an exception in the read loop once it finds a NULL value in any column. I will appreciate any help in this issue.

String StoredProcedure =
"app_mt.pk_portfolio_chars_calc.get_portfolio_chars_eq_bands";

OracleCommand command = new OracleCommand(sStoredProcedure, conn);

command.CommandType = CommandType.StoredProcedure;

command.Parameters.Add("p_product_id", OracleDbType.Decimal);
command.Parameters.Add("calc_id", OracleDbType.Decimal);
command.Parameters.Add("p__

Long postings are being truncated to ~1 kB at this time.

_

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2003
Added on Dec 19 2002
2 comments
1,030 views