ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyunam Kim" <kyu...@e-iit.com>
Subject batch skips the first insert?
Date Wed, 09 Feb 2005 15:38:54 GMT
Hi all.
 
The following does insert only 4 records, skipping the first one.
If I don't use batch, it inserts 5 perfectly.
 
Has anyone seen this problem in the past?
 
Thank you.
 
Kyunam
 
try {
      _sqlMapClient.startBatch();
 
      for (int i = 0; i < 5; i++) {
 
        _stopDAO.insert(location);
 
      }
 
      _sqlMapClient.executeBatch();
 
    } catch (final java.sql.SQLException e) {
      e.printStackTrace(System.out);
      throw e;
    }
 

Mime
View raw message