java代码
prepareStatement pst = conn.prepareStatement("update a set a1 = ? where a2 = ?");
for(...){
pst.addBatch();
}
pst.executeBatch();
因为程序原因没有进for循环,导致直接走executeBatch报错
dm.jdbc.driver.DMException: 有参数未绑定: 0
第一次集成达梦,公司平台公共jar包的问题改起来流程很麻烦,有没有其他办法能避免这个问题
确保在使用 executeBatch 方法之前,你已经使用 addBatch 方法至少添加了一条 SQL 语句到批处理中。