After looking at many other Exhausted result set posts and performing a large amount of googling, i have still not managed to solve my SQL exception!!
the following code:
ResultSet resultSet = stmt.executeQuery( sql );
TableField metadataFields = params.getBasicQueryMetadata().getBasicQueryFields();
while ( resultSet.next() );
for ( int i = 0 ; i < metadataFields.length ; i++ )
String name = metadataFields.getName();
String alias = metadataFields.getAlias();
String value = resultSet.getString( name );
using the oracle thin driver... (url = jdbc:oracle:thin:user/password@host:port:database)
Always barfs at the line: String value = resultSet.getString( name ); on the first iteration!
I am not closing the statement/connection/resultset before i run this line of code. I can gurantee that the SQL passed through should generate a resultSet with 25 rows in it (i print out the SQL in a log and copy this into Toad to test it!)
I am however sharing the Connection object used to create the Statement, but i am currently running the code without any other queries being run, so it cant be that!?
I have tested that a count(*) query works using the same driver/url and exactly the same SQL - this returns a valid resultset from which i can return how many records should be in the above result set.
Any other ideas??