Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with BatchExection of CallableStatement with StoredProcedures in DB2

 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Raghavan,
Can you share your code i think we can help you by more understanding of you code..
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saif,
Thank you. Please have a look at the method. Let me know if you can do something.



Thanks,
Raghavan.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4009
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4009
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its done Scott.

Thank you.
Raghavan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic