× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
nhilam reported 2013-04-23T19:09:50Z  · tariqrahiman last modified 2013-10-08T21:00:10Z

ResultSet is invalidated by another statement


Dev
Nhi Lam
nhilam
QA
Priority Major
Complexity Unknown
Component Hive
Version 14.0

Consider the following code fragment:

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM table1");

getCount();  // this call causes the below rs.next() to return false

while(rs.next()) {
   ...
}

void getCount() {
   Statement stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery("SELECT count(*) FROM table1");
   while(rs.next()) {
      rs.getObject(1);
   }
}

If the above call to getCount() is commented out, then the while loop will succeed in retrieving the data from the result set.

Issue #8724

Closed
Fixed
Resolved 2013-04-29T18:16:09Z
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017