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

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

    Hi All,
    Urgent!!
    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: com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement incompatible with java.sql.CallableStatement

    Your help is highly appreciated.
    Vivek

  • #2
    Guys any help????

    Comment


    • #3
      Originally posted by vivekdandale View Post
      Guys any help????
      You need to use the NativeJdbcExtractor in your case probably a WebSphereNativeJdbcExtractor
      see http://static.springsource.org/sprin...html/jdbc.html

      Comment

      Working...
      X