Announcement Announcement Module
Collapse
No announcement yet.
Passing parameters to stored procedure. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing parameters to stored procedure.

    Hi,

    we are using spring framework. I have a requirement to call stored procedures from java.

    I am able to call the stored procedure by passing parameters like String, one dimensional arrays long[], String[] etc...

    If i have to pass array of objects i am not able to do.

    We have a object created in oracle which has four attributes. 2 of type Number and 2 of type Varchar.

    Now i have to pass array of objects( Java VOs) to stored procedure.
    I tried passing a 2 dimensional array it did not work. I created a Vo similar to oracle object and tried passing array of VO's, then also it did not work.

    While creating array descriptor i am not facing any problems. When execute statement is called i am getting error.

    1. When I passed a two dimensional array for array , I got following error

    java.sql.SQLException: Inconsistent java and sql object types

    2. When I passed array of VOs for array , I got following error

    java.sql.SQLException: Fail to convert to internal representation


    How to pass Array of VO to stored procedure. Please let me know.


    Thanks
    Mahesh
Working...
X