Announcement Announcement Module
No announcement yet.
How to call stored procedure with IN-OUT parameters in batch? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to call stored procedure with IN-OUT parameters in batch?

    Hi All,
    I am badly stuck in one issue. I want to call oracle stored procedure in loop. Store procedure has IN and OUT parameter. i canít replace store procedure with any other thing as my requirement is like that only.
    1. I know how to extend StoreProcedure class but in that approaches i will end up in calling execute method in loop which i think is not good approach.
    2. I tried to use jdbcTemplate.batchUpate but in that case when I am trying to override setValue method of BatchPreparedStatementSetter class I am not able to set out parameters as it use prepared statement object. Even I tried to type cast prepared statement to callable statement but it throwing me below error as I am using JNDI datasource of IBM WEBSERVER.

    java.lang.ClassCastException: incompatible with java.sql.CallableStatement

    Your help is highly appreciated.

  • #2
    Guys any help????


    • #3
      Originally posted by vivekdandale View Post
      Guys any help????
      You need to use the NativeJdbcExtractor in your case probably a WebSphereNativeJdbcExtractor