I would just use batch update here instead by just calling updateDrugOrderStatement.addBatch() and then before line 49 below i call updateDrugOrderStatement.executeBatch()