File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC batch statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC batch statement" Watch "JDBC batch statement" New topic
Author

JDBC batch statement

Sub swamy
Ranch Hand

Joined: Oct 02, 2002
Posts: 121
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30294
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30294
    
150

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC batch statement