Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v6.0
  Buy Now
  HXTT Cobol v3.0
  HXTT DBF v6.0
  HXTT Excel v5.0
  HXTT Paradox v6.0
  HXTT Text(CSV) v6.0
  HXTT XML v2.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
Heng Xing Tian Tai Ltd. of Beijing City (abbr, HXTT)

Robert Nimax
2010-01-25 03:06:33.0
Dear Sir or Madam,
we are using the JDBC 4.0 Driver for MS Access in an hibernate environment.
We downloaded the current version having the release date 2010-01-20 06:30.
Everything works great, but recently we spotted a problem regarding time zones.
Every update is 2 hours behind the current date.
Our location is Germnay, so there time zone should something like "Berlin" with daylight saving time. If I set the time zone manually to compensate the offet...
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("GMT+2"));... works.
Other JDBC drivers do not have this problem.
So please tell me, what is wrong ?
Thank you for your help.

Robert Nimax
HXTT Support
2010-01-25 03:31:28.0
What's your update sql? If you are using PreparedStatement, you should use PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal).
Robert Nimax
2010-01-25 03:39:25.0
We are not using PreparedStatement directly. We are using the Grails framework which uses hibernate for OR-Mapping.
May it is a workaround to use JDBC instaed of GORM respectively hibernate at these code areas, but isn´t any other possibility ?
Robert Nimax
2010-01-25 03:58:01.0
OK, I checked it. If we convert the calculated date (java.util.Date)to a java.sql.Timestamp, the prepared statement will work correcty and do a good job. But the problem is, that we actually do not use the JDBC-API directly because it is encapsulated by Grails/GORM respectively hibernate.
Maybe there is a chance if we modify our domain classes thate represent records of the database ?

Thank you for your help.

Robert Nimax
Robert Nimax
2010-01-25 05:47:24.0
Well, I changed the properties of the domain from java.util.Date to java.sql.Timestamp, but we have the same problem now. Maybe hibernate does not use PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal) ?
HXTT Support
2010-01-31 08:12:27.0
Please download the latest package, you can try timezone=local connection property.

Search Key   Search by Last 50 Questions


Copyright © 1999-2017 Heng Xing Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap