• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Exhausted Resultset

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am making use of Oracle and Type-IV driver.
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic