Using Turbine how should I handle dates with my Criteria objects.

We currently have an ASP app hitting a Sybase server.  We bought the app
along with a bunch of other stuff just to get things going.

Like I said the app is hitting Sybase, but I want to move it to Oracle
in the future since most of our db's are Oracle.  Sybase and Oracle
don't handle date formats in the sql the same.

IE:

Sybase: criteria.add( TNoticeEntryPeer.POSTED_DATE, "01/01/2001" );

Oracle: criteria.add( TNoticeEntryPeer.POSTED_DATE,
"TO_DATE('01/01/2001', 'mm/dd/yyyy'" );

Should I create a utility class for this, or does Turbine have something
to handle this.  I wasn't able to find anything.



Funny story:  Along with this app we bought another ASP app for gas
(natural gas) pipeline.  Web server in Virgina, db in Tulsa.  The asp
app has been dieing for our clients all the time since it went live
1/1/02.  I created a test ASP page to run a given SQL, and a
Turbine/Velocity page to run the same SQL.

ASP: 3.3 seconds
Turbine: 0.117

Tried it on a dev webserver on the same rack as the db.  ASP: 0.22
secs.  Turbine was still faster being 2k miles away for the db.

Needless to say I've convinced my client that further apps should be
writen in Java.

Just out of curiousty.  Anyone know why ASP pages are soo slow in this
situation?  (db and webserver in diferent locations)  Can't be the
network since the java apps don't have any problems.


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

Reply via email to