Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.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 Lab of Xi'an City (abbr, HXTT)

HXTT ACCESS
timezone issue with bulk insert from different driver resultset
Laura Irimiciuc
2010-02-23 01:09:58
Hi,

For exporting data from SQL Servet to Access, we are using this snippet of code:

String sql = "insert into [" + ACCESS_TABLE_NAME+ "] ?;";
pstmt = accessConnection.prepareStatement(sql);
pstmt.setObject(1, eimRs);//insert a sqlserver resultSet into destination table
pstmt.executeUpdate();

An old driver (Implementation-Version: 1.1.039 on May 16, 2006) inserted datetime fields with GMT timezone, but after upgrading to last hxtt access driver (Specification-Version: 3.2.121 on January 31, 2010), we noticed this driver version uses JVM's timezone. Is there a specific reason for this change? And is there some workaround to use GMT timezone and preserve this bulk insert approach ?
Re:timezone issue with bulk insert from different driver resultset
HXTT Support
2010-02-23 06:49:04
>Is there a specific reason for this change?
Some customers require using local timezone as default timezone.

> And is there some workaround to use GMT timezone and
> preserve this bulk insert approach ?
timezone=GMT connection property.
Re:Re:timezone issue with bulk insert from different driver resultset
Laura Irimiciuc
2010-02-25 22:58:18
I tried setting Connection property in two ways:

DriverManager.getConnection("jdbc:access:/\\\\is-host\\Inputs\\a.mdb?timezone=GMT");

or

Properties props = new Properties();
props.setProperty("timezone","GMT");
accessConnection = DriverManager.getConnection("jdbc:access:/\\\\is-host\\Inputs\\a.mdb",props);

But neither of these works..Am I doing smth wrong?

Laura
Re:Re:Re:timezone issue with bulk insert from different driver resultset
HXTT Support
2010-02-26 00:05:31
Please download the latest package, then use timezone=local connection property.
Re:Re:Re:Re:timezone issue with bulk insert from different driver resultset
Laura Irimiciuc
2010-02-27 05:33:14
Thank you, this solved the problem.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap