views:

132

answers:

1

Converting from usind Micorsofts Syste.Data.OracleClient to what I believe is called Oracles ODT (Oracle.DataAccess 10.2.0.100). When I try and send a date I get this error "ORA-1858: a non-numeric character was found where a numeric was expected". This code worked great using System.Data.OracleClient.

cmd.Parameters.Add(New OracleParameter("I_FIRST_LOSS_EVENT_DATE", OracleDbType.Date)).Value = .LossEventsMessages(0).LossEventTime

Thanks,

Dave

A: 

As per Table 3-10 in the Oracle Data Provider for .NET Developer's Guide, the data type of the Value property of the parameter should be System.DateTime (unless you're willing to use an ODP.NET-specific type, in which case it should be OracleDate or one of the OracleTimeStamp types, depending on your column/parameter type).

Vadim K.
I switched to OracleDate but get this error when I exicute it.ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at line 1
Are you certain that this newer problem you're running into is caused by this parameter? From the sound of this most recent error message, I suspect that you may have an issue with the `OracleCommand`'s `CommandText` property.
Vadim K.