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
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
[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
, 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
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
Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 10:13 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
ignores milliseconds in TOMCAT + ddbb Oracle
It's a long time since my last Oracle project ;)
The OP was finding milliseconds weren't
? To see them, I mean?
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 10:13 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
ignores milliseconds in TOMCAT + ddbb Oracle
It's a long
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jose,
I marked this as off-topic because it doesn't have anything to do with
Tomcat. Tomcat doesn't do anything to your SQL queries, etc. See below.
Jose Gargallo wrote:
I have a J2EE application that runs in Oracle and Postgres databases
and OC4J
and what date type are you using? sql.date or util.date?
-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 07, 2007 8:55 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
ignores milliseconds
-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 -
10 matches
Mail list logo