Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  Buy Now
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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
Hongxin Technology & Trade Ltd. of Xiangtan 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


Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap