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!

DBNull value and OracleParameter

408310Nov 14 2003 — edited Nov 20 2003
Hi,

I want to create an OracleParameter where the value could be System.DbNull.Value and pass it as a parameter to a store procedure. Below is my approach to the problem which throw an exception ORA-01858...

Dim _oraParam As OracleParameter = cmd.CreateParameter
cmd.Parameters.Add(_oraParam)

With _oraParam
.ParameterName = "testDate"
.OracleDbType = OracleDbType.Date
.Direction = ParameterDirection.Input
.SourceVersion = DataRowVersion.Current
.IsNullable = True
.Value = System.DBNull.Value
End With

What is the bug in this code and I get the exception?
What do you suggest ?

Thanks in advance....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2003
Added on Nov 14 2003
7 comments
6,404 views