It's a long time since my last Oracle project ;)
The OP was finding milliseconds weren't being stored. I was under the
impression this would be the case if the date datatype were being used
instead of a timestamp.
Propes, Barry L wrote:
if he's using Oracle, a date field should take any kind of timestamp variable.
Oracle does have a Timestamp field/data type, but you don't have to make it as
such to get this to work.
Could have been that my JDK API differed slightly from your's.
-----Original Message-----
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 4:49 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
ignores milliseconds in TOMCAT + ddbb Oracle
That looks ok. Timestamp is the correct thing to use.
You have two systems: one that works, one that doesn't. So, check for
differences in the SQL sub-systems between the two:
Are the drivers of the same (uptodate) version?
Are the database schemas using the same column type? (ie the one that
fails is silently truncating the data)
In your original post you mentioned Oracle9i and Postgres. If one works
and the other doesn't, again, check the column type is correct.
Jose Gargallo wrote:
This is the code:
java.sql.Timestamp time = new Timestamp(System.currentTimeMillis());
...
pstmt = this.conexion.prepareStatement(INSERT);
...
pstmt.setTimestamp(1, time);
should I use java.sql.Date instead of java.util.Data?
thanks
Christopher Schultz escribió:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Barry,
Propes, Barry L wrote:
and what date type are you using? sql.date or util.date?
I'm pretty sure that's going to be the problem.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGuIVQ9CaO5/Lv0PARArnpAJ93DhQqc6o9l7P49h3AVJkK20mxYQCdFvSO
oPt8Wv6Y4Al0jqJBets5UuY=
=Mn29
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]