You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Krishnamoorthi, Sruthi (Raytheon)" <Sr...@USPTO.GOV> on 2006/02/16 20:23:20 UTC
executeBatch () returns 0
executeBatch () returns 0 : Solution please
code:
try
{
sqlMap.startTransaction();
sqlMap.startBatch();
for (int i=0;i<docCnts.size();i++)
{
System.out.println("updtFlCntList"+((Document)docCnts.get(i)).toString());
sqlMap.update("updtFlCntsList",(Document)docCnts.get(i));
}
updCount =sqlMap.executeBatch();
System.out.println("updCount:-"+updCount);
sqlMap.commitTransaction();
}
catch (SQLException e)
{
try
{
sqlMap.endTransaction();
}
catch(SQLException se)
{
throw new RuntimeException("SQLException:"+se);
}
logger.debug(e.getMessage());
throw new FileContentException(e.getMessage());
}
finally
{
try
{
sqlMap.endTransaction();
}
catch(SQLException se)
{
throw new RuntimeException("SQLException:"+se);
}
}
return updCount;