哎呀!是mm的jdbc真的不支持准备语句pst或者语句st的批量处理,还是我的程序有错!!!!快来看看!!!

03-03-14 mdwolf

哎呀!是mm的jdbc真的不支持准备语句pst或者语句st的批量处理,还是我的程序有错!!!!快来看看!!!

help!!!!

我开始用:

// pst1 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL1);

// pst2 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL2);

// pst3 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL3);

// pst1.setInt(1, i);

// rs = pst1.executeQuery();

//

// while(rs.next()){

// pst2.setInt(1,rs.getInt(1));

// pst2.addBatch();

// pst3.setInt(1,rs.getInt(2));

// pst3.addBatch();

// }

//

// pst2.executeBatch();

// pst3.executeBatch();

//

// b = true;

报错!

// DBC Driver: org.gjt.mm.mysql.Driver

// java.sql.SQLException: Not implemented

// at org.gjt.mm.mysql.Statement.executeBatch(Statement.java:902)

// at com.cnjsp.db.pool.PooledPreparedStatement.executeBatch(PooledPreparedStatement.java:140)

所以我只好这样了:

pst1 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL1);

pst2 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL2);

pst3 = conn.prepareStatement(ISqlName.ORDER_MAIN_ADMIN_DEL_SQL3);

pst1.setInt(1, i);

rs = pst1.executeQuery();

while(rs.next()){

pst2.setInt(1,rs.getInt(1));

pst2.executeUpdate();

pst3.setInt(1,rs.getInt(2));

pst3.executeUpdate();

}

b = true;

scorpio_leon
2003-03-14 13:16

import mm的jdbc2的class就可以,我以前试过,希望没记错

mdwolf
2003-03-14 13:27

好好!!!我试试!