Bug #3213 | Need an efficient JDBC way to discard the remaining records of a resultsets | ||
---|---|---|---|
Submitted: | 17 Mar 2004 13:52 | Modified: | 17 Mar 2004 14:07 |
Reporter: | Christian Ouellet | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | Connector / J | Severity: | S4 (Feature request) |
Version: | 3.0.11 | OS: | Any (All) |
Assigned to: | CPU Architecture: | Any |
[17 Mar 2004 13:52]
Christian Ouellet
[17 Mar 2004 14:07]
Mark Matthews
Other than closing the connection itself, there is no way to read the rest of the rows. The server has already sent them, so until they're at least pulled off the wire, you can't do anything else. Have you looked at using Statement.setMaxRows(), or alternatively, if you can alter the query, adding a where clause that evaluates to false, e.g. ' AND 1=2', which will cause the query to return no rows?