0
SQL 서버 (200) 자바 1.4 보스 3java : java 1.4 api에서 값이 false 인 자동 커밋 모드를 설정할 수 없습니까?
HI는
코드가
try {
try {
connection = getConnection();
} catch (Exception e) {
throw new ConnectionException(e.getMessage());
}
for(int i=0;i<recordIds.size();i++)
{
String currentRecordId=(String)recordIds.get(i);
try
{
//exception on this line connection.setAutoCommit(false);
preparedStatement = connection.prepareStatement(getSQL("PurgeRecordInDumpData"));
preparedStatement.setLong(1,Long.parseLong(currentRecordId));
int numberOfUpdates=preparedStatement.executeUpdate();
if(numberOfUpdates!=1)
{
throw new Exception("Record with record id "+currentRecordId +"could not be purged.");
}
preparedStatement.close();
connection.commit();
listOfPurgedRecords.add(currentRecordId);
}
catch(Exception e)
{
connection.rollback();
}
}
return listOfPurgedRecords;
}
이의 원인이 무엇 이하 "관리 트랜잭션 동안 당신은 설정할 수 없습니다 자동 커밋"예외 메시지 무엇입니까 예외는 무엇을 의미합니까?