At the risk of wandering off-topic here, we discovered that when we store a java.util.Date to an Oracle database using an Oracle "date", we lost the millisecond precision of our Java data; switching the column to an Oracle "timestamp" solved the problem. We noticed this because various unit tests that made assumptions about a retrieved date being before or after a reference date were failing mysteriously. BTW, we're pretty much Oracle novices here...

John

Joe Germuska wrote:

At 6:37 PM -0700 2/19/04, Brad Matlack wrote:

> > Oracle doesn't have a TIMESTAMP type; its "DATE" encompasses SQL TIME,

> TIMESTAMP, and DATE.


No I think you misunderstood the meaning of TIMESTAMP with Oracle in this case. With MySQL for example Timestamp column is just that a timestamp from the DB, nothing you can insert into, like an auto date column. In Oracle timestamp contains the date AND time in the field, where as the date field contains just the date.


I may well have... I always figured that since you can't make a column in an Oracle table of type "timestamp" that it was just an Oracle quirk. Or, to avoid sticking my neck out too far again, whenever I tried using "timestamp" as a column type in my Oracle databases, I've gotten an error.


In any case, it seems like everyone who is used to writing Oracle SQL is used to using the "to_date" function to make sure that their String representations use correct date formats, and it seems like one shouldn't have to change a database-level setting to make OJB work. There should be an application-layer place to make it work.

Joe


--
---------------------------------------------------------
Jentro Technologies GmbH
John L. Webber, Software Development
---------------------------------------------------------
Rosenheimer Str. 145e 81671 M�nchen
Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED] Fax +49 89 189 169 99 http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. ---------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to