On Friday, December 20, 2013 6:07:04 AM UTC-8, Andreas Leitgeb wrote:
When would one call .getMoreResults() on a statement instead of just
another rs.next() on the first one (obtained from stmnt.getResultSet())?
Are these equivalent, or is there really a concept of multiple ResultSets,
each of which has its own independent set of rows?
Yes, there is the concept of multiple independent ResultSets.
Seeing the comments elsewhere in this thread, I was kind of
surprisedthat stored procedures returning multiple ResultSets was
somewhat obscure and that Oracle doesn't support them.
I was also under the apparently mistaken impression that passing
multiple statements (optionally separated by semi-colons or whatever)
to a single executeXXX(), or whatever, was reasonably well supported.
This case allows not just multiple queries but also a mixture of
statements: query, update, control and even DDL, returning multiple
'results', instead of just multiple ResultSets.
SQL injection much worse.
I would consider it a security flaw.
And it is not widely supported.