Hello,
Could you please help me out on this issue.
executeBatch is always returning zero.
Could you please look into this code and reply me ASAP. I have an urgency.
MyCode:
public int updtFlCntList(ArrayList docCnts)throws FileContentException
{
int updCount = 0;
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;
}
Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A - (Raytheon) Location