以下鳕鱼:
String url;
ConnectionURL cURL= new ConnectionURL();
url=cURL.getCloudConnection();
try (Connection conn = DriverManager.getConnection(url))
{
Statement statement = conn.createStatement();
conn.setAutoCommit(false);
for(int i=9;i<updateCformValues.size()-1;i++){
List<Object> row=updateCformValues.get(i);
String JDECode =(String)row.get(0);
String CValue =(String)row.get(3);
String updatedata = "update CRdataTable set OutstandingCFormValue='"+CValue+"' where JDECode ='"+JDECode+"' ";
log("String"+i);
statement.addBatch(updatedata);
}
statement.executeBatch();
conn.commit();
}
}
catch (Exception e) {
// TODO: handle exception
out.print(e);
e.printStackTrace();
}
大惊小怪
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed
请帮助我,谢谢。