dendenners
Programmer
Hi there,
I'm having a problem with an 'exhausted resultset' SQLException in one of my statements. I've read a few FAQs about this, and the consensus is that the problem occurs when you try to access a ResultSet when you've already closed it. However i havent done this, and I'm still getting this error! I was wondering if it would have something to do with the fact that I'm accessing the USER_TAB_COLUMNS table. Any ideas? thanks
Code snippet:
sqlString = "SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = ? ORDER BY COLUMN_NAME ASC";
prepStmt = con.prepareStatement(sqlString);
prepStmt.clearParameters();
prepStmt.setString(1, tableName);
ResultSet results = prepStmt.executeQuery();
while(results.next());
{
//Exhausted ResultSet SQLException thrown in next line
col = results.getString("COLUMN_NAME"
fieldList.add(makeFieldBean(col));
}
I'm having a problem with an 'exhausted resultset' SQLException in one of my statements. I've read a few FAQs about this, and the consensus is that the problem occurs when you try to access a ResultSet when you've already closed it. However i havent done this, and I'm still getting this error! I was wondering if it would have something to do with the fact that I'm accessing the USER_TAB_COLUMNS table. Any ideas? thanks
Code snippet:
sqlString = "SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = ? ORDER BY COLUMN_NAME ASC";
prepStmt = con.prepareStatement(sqlString);
prepStmt.clearParameters();
prepStmt.setString(1, tableName);
ResultSet results = prepStmt.executeQuery();
while(results.next());
{
//Exhausted ResultSet SQLException thrown in next line
col = results.getString("COLUMN_NAME"
fieldList.add(makeFieldBean(col));
}