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
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 ?
>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.
I tried setting Connection property in two ways:
Properties props = new Properties();
accessConnection = DriverManager.getConnection("jdbc:access:/\\\\is-host\\Inputs\\a.mdb",props);
But neither of these works..Am I doing smth wrong?
Please download the latest package, then use timezone=local connection property.
Thank you, this solved the problem.