java - passing array in oracle stored procedure

前端 未结 2 1094
耶瑟儿~
耶瑟儿~ 2020-11-29 10:48

I have a Java app accessing an oracle stored procedure. The arguments to the stored procedure include an array type. I do it like the following...

con = this         


        
2条回答
  •  一向
    一向 (楼主)
    2020-11-29 11:32

    the type VARCHAR2_ARR is a PLSQL type, you won't be able to interface it directly from java. I suggest you look into this thread on AskTom regarding a similar question.

    Here are a couple suggestions:

    • create a SQL TYPE that you can bind from java
    • insert into a temporary table from java and read from it in plsql

    In both cases you will have to either modify the PLSQL procedure or add a new translation procedure.

提交回复
热议问题