• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue with BatchExection of CallableStatement with StoredProcedures in DB2

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its done Scott.

Thank you.
Raghavan.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic