[Mono-devel-list] Binding Date/Time parameters in OracleClient..

Curtis Wensley cwensley at mail.sydneyplus.com
Wed Feb 9 16:32:00 EST 2005


Hi!
 
How would I go about binding a DateTime parameter in oracle exactly (in
linux)?  
 
I am binding it as DbType.DateTime, with a value of DateTime.Now,
but it gives me this error:
 
System.Data.OracleClient.OracleException: ORA-01843: not a valid month
 
example:
 
comm.CommandText = "insert into myTable (fCreatedTime) values
(:currentTime)";
IDbDataParameter param = comm.CreateParameter();
param.ParameterName = "currentTime";
param.DbType = DbType.DateTime;
param.Value = DateTime.Now;
comm.Parameters.Add(param);
 
comm.ExecuteNonQuery();
 
Possibly incomplete implementation?
 
Thanks,
Curtis.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050209/4f8e76b5/attachment.html 


More information about the Mono-devel-list mailing list