Bạn cần làm:
// 386 is an odd batch size?
sql.withBatch(386, 'insert into tab1(col1,col2) values (?, ?)') { ps ->
innerXml.Row.each { row ->
ps.addBatch(row.Column0.text(), row.Column1.text())
}
}
Bạn cần làm:
// 386 is an odd batch size?
sql.withBatch(386, 'insert into tab1(col1,col2) values (?, ?)') { ps ->
innerXml.Row.each { row ->
ps.addBatch(row.Column0.text(), row.Column1.text())
}
}