在SQL server和oracle中,即使没有添加批处理也可以运行executeBatch(),但是在HSQL中没有这样做,是否可以解决此问题?
try
{
Connection con = com.Analytix.Beans.ConnectionObjectFactory.getConnectionHSQLConnection();
PreparedStatement pst =con.prepareStatement("insert into TEST (tname) values (?)");
int[] executeUpdate = pst.executeBatch();//no batch statement Exception
System.out.println(executeUpdate);
} catch (Exception e) {
e.printStackTrace();
}