DBNull value and OracleParameter
408310Nov 14 2003 — edited Nov 20 2003Hi,
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....