java - How to get ResultSet from executeBatch? -
i need result set executed batch :
string [] queries = {"create volatile table testtable (select * orders) data;", "select top 10 * testtable;" , "drop table testtable" }; (string query : queries) { statement.addbatch(query); } statement.executebatch();
ones execute batch how can result set select query ?
in short, should not. plain multiple execute() should used.
as according javadoc of executebatch()
, should not support getresultset()/getmoreresults() api.
also, in jdbc™ 4.0 specification #14.1.2
only ddl , dml commands return simple update count may executed part of batch. method executebatch throws batchupdateexception if of commands in batch fail execute or if command attempts return result set.
but jdbc drivers might support, try @ own risk.
Comments
Post a Comment