OracleDateTime

  • Thread starter Thread starter Cowboy \(Gregory A. Beamer\)
  • Start date Start date
C

Cowboy \(Gregory A. Beamer\)

Anyone have any clue why invalid date casts fine into OracleDateTime.

DateTime dt = new DateTime(20004,14,45); // this
bombs
SqlDateTime dt = new SqlDateTime(20004,14,45); // this
bombs
OracleDateTime dt = new OracleDateTime (20004,14,45); // this is
perfectly fine

Until it hits the database, I assume. Have not tried yet. 14/45/20004 should
NEVER be a valid date, even in Oracle.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Hi Gregory,

OracleDateTime (as you've discovered) doesn't check the validity of those
parameters.
It simply packs them as they are and sends them to server.
I guess you could call it lack of client side validation.
 
Back
Top