[prev in list] [next in list] [prev in thread] [next in thread]
List: turbine-torque-user
Subject: Problem upgrading from 3.0 -> 3.1 ( Bad Timestamp )
From: "anon permutation" <anonpermutation () hotmail ! com>
Date: 2003-09-18 7:39:39
[Download RAW message or body]
Hi,
There seem to be a problem with 3.1 when generating sql statement for
timestamp for postgresql.
When I issue the following code:
Criteria selectObj = new Criteria();
selectObj.add(InstruIntradayPeer.INSTRU_PK, instruPk);
if(beginDate!=null){
Criteria.Criterion addBeginDate =
selectObj.getNewCriterion(InstruIntradayPeer.SAMPLE_DATE, beginDate,
Criteria.GREATER_THAN);
selectObj.and(addBeginDate);
}
if(endDate!=null){
Criteria.Criterion addEndDate =
selectObj.getNewCriterion(InstruIntradayPeer.SAMPLE_DATE, endDate,
Criteria.LESS_THAN);
selectObj.and(addEndDate);
}
This (simplified) sql statement is generated:
SELECT * FROM instru_intraday WHERE
(instru_intraday.SAMPLE_DATE>'20030916000000' AND
instru_intraday.SAMPLE_DATE<'20030918152213')
However, postgresql will complain about -- Bad timestamp external
representation '20030916000000'
Sample_Date is a timestampl column.
Please help.
--------------------------------------------------------------------------------------------
Hi,
After I upgraded my code from Torque 3.0 to Torque 3.1, I get the following
error when I run the app.
java.sql.SQLException: ERROR: Bad timestamp external representation
'20030916000000'
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:505)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:318)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:165)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:154)
at com.workingdogs.village.QueryDataSet.<init>(Unknown Source)
at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1539)
... 21 more
I am using postgresql 7.3.4 and the latest stable jdbc drivers.
Any ideas? Thanks.
_________________________________________________________________
Try MSN Messenger 6.0 with integrated webcam functionality!
http://www.msnmessenger-download.com/tracking/reach_webcam
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic