• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exhausted Resultset

 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i am trying to perform any operation on scrollable and updatable resultset I am getting SQLException saying resultset exhausted. When exactly this exception comes?

Do queries in batch updates are automatically committed even if setAutoCommit() is set to false. Do it won't be taking any effect on batch updates?
 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making use of Oracle and Type-IV driver.
 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We get exhausted resultset when resultset contents are not current and/or resultset contains stale data
We need to explicitly commit the transaction for batch updates
 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

But when i am executing batch updates then even if i have not said commit() it is committing the changes to DB(Oracle) even if the setAutoCommit() is set to false.

I didnt get this how this is happening?

Thanks once again.
 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Idieally it doesn insert into dabase but doesn't commit.In other words
If we run query on database we can see records but if we try to execute query from program we won't see them. (Dirty read)
Please recheck this scenario

And use executeBatch rather than execute method as execute method some hoe opens the resultset and we get some weied erros like too many open cursors or exhausted resultset etc etc
[ April 17, 2007: Message edited by: Gaurav Chikara ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic