I am using v5.1 of the HXTT Access driver with JDK 1.7. I am having a problem with SQL where math is done with dates (e.g., add, subtract, etc.) or where dates are compared with each other. For example, the following program causes an exception:
package test;
import java.sql.*;
public class Main {
public static void main(String args[]) throws Exception
{
Class.forName("com.hxtt.sql.access.AccessDriver");
Connection db = DriverManager.getConnection("jdbc:access:/C:\\");
Statement stmt = db.createStatement();
ResultSet rs = stmt.executeQuery("SELECT DATE_ADD(DATE(), INTERVAL 1 DAY);");
rs.next();
System.out.println(rs.getDate(1).toString());
rs.close();
stmt.close();
db.close();
}
}
...
Exception in thread "main" java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException: 1
at com.hxtt.sql.d3.a(Unknown Source)
at com.hxtt.sql.d3.a(Unknown Source)
at com.hxtt.sql.d3.a(Unknown Source)
at com.hxtt.sql.d3.a(Unknown Source)
at com.hxtt.sql.d3.a(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.bz.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.am.executeQuery(Unknown Source)
at test.Main.main(Main.java:14)
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.bz.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.am.executeQuery(Unknown Source)
at test.Main.main(Main.java:14)
|
2013-08-27 fixed an ArrayIndexOutOfBoundsException bug on system function since 2013-08-09.
|