S
stef
Hello,
with JDBC 3.0 and jtds 1.2.2 I try to retrieve multiple recordset with
....
r = stmt.execute(Query);
// how many resultsets did we really find ?
nbrs=0;
rs= new ResultSet[30]; // hard limit
while (r)
{
rs[nbrs]=stmt.getResultSet();
nbrs++;
// trouble
r = stmt.getMoreResults(Statement.KEEP_CURRENT_RESULT);
}
If I execute, for example, a stored procedure which returns 2
resultsets, the stmt.getMoreResults() throws:
java.lang.IllegalStateException: There should be no queued results ???
Now, if I change to r = stmt.getMoreResults(); it works... (but of
course I lose my previous resultset)
What's wrong in my code ?
with JDBC 3.0 and jtds 1.2.2 I try to retrieve multiple recordset with
....
r = stmt.execute(Query);
// how many resultsets did we really find ?
nbrs=0;
rs= new ResultSet[30]; // hard limit
while (r)
{
rs[nbrs]=stmt.getResultSet();
nbrs++;
// trouble
r = stmt.getMoreResults(Statement.KEEP_CURRENT_RESULT);
}
If I execute, for example, a stored procedure which returns 2
resultsets, the stmt.getMoreResults() throws:
java.lang.IllegalStateException: There should be no queued results ???
Now, if I change to r = stmt.getMoreResults(); it works... (but of
course I lose my previous resultset)
What's wrong in my code ?