aspose file tools*
The moose likes JDBC and the fly likes Issue with BatchExection of CallableStatement with StoredProcedures in DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Issue with BatchExection of CallableStatement with StoredProcedures in DB2" Watch "Issue with BatchExection of CallableStatement with StoredProcedures in DB2" New topic
Author

Issue with BatchExection of CallableStatement with StoredProcedures in DB2

Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi,

I have an issue with the batch execution (executeBatch() method) of the CallableStatement.

I use IBM DB2 V8.1 database. When i m doing the batch update with the CallableStatement which is obtained on the Stored Procedure call, the adding is done successfully. But the Execution is not happening as expected. Its executing only one row (mostly the first row in the batch). The database is having only one row inserted as the procedure is for inserting a row at a time.

Once it gets executed, i m able to get the batchcount correctly where it shows the total number of elements being processed while adding. But the execution does not take place.

If the same CallableStatement is obtained on the simple sql query (say in my case the INSERT statement), its working perfectly. But not on the Procedure.

I am using WSAD 5.1 with db2java.zip. Can anyone help me please? I had looked into the JDBC Driver Implementation as well the JDBC Support in the IBM site as well , but could not get the reqd info!

I myself had worked previously the same executeBatch() with Stored Procedures in SQL Server 2000 with no issues.

Any suggestions and immediate help is much appreciated!

Thanks,
Raghavan alias Saravanan M.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

hi Raghavan,
Can you share your code i think we can help you by more understanding of you code..


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi Saif,
Thank you. Please have a look at the method. Let me know if you can do something.



Thanks,
Raghavan.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3707
    
    5

"Raghavan alias Saravanan Muthu"

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
Scott
JavaRanch Bartender


My Blog: Down Home Country Coding with Scott Selikoff
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi Scott,
I have read the terms and naming policy very well. This is my name in full and used as such in all my official documents including my Passport.
But still not to offer myself for further controversies, i have changed my name after seeing your post.
I believe now it obeys the naming conventions.

Thanks,
Raghavan.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3707
    
    5

"Raghavan M"

Please review our naming policy again as your name still does not conform to the policy. In particular it must be a first name or letter followed by a last name. Last names cannot be single letters.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Its done Scott.

Thank you.
Raghavan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with BatchExection of CallableStatement with StoredProcedures in DB2