• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC batch statement

 
Sub swamy
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am using JDBC batch statement in DB2 V8. Is there any way for me to know the number of statements that can be executed at the same time using statement.executeBatch() ? Is there any limit ? And what would be the exception if this limit is exceeded ?

Would appreciate if someone could throw more light into this.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what the limit is, but one way to find out is to try it. Put the addBatch statement in a loop and see what happens. If any exception is thrown, it would be a SQLException.
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
I don't know what the limit is, but one way to find out is to try it. Put the addBatch statement in a loop and see what happens. If any exception is thrown, it would be a SQLException.


My money's on OutOfMemoryException...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by stu derby:


My money's on OutOfMemoryException...

True. I was thinking along the lines of a hard coded limit. If it's a runtime thing, I agree with out of memory!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic