Question

We need to send data to oracle stored procedure that requires ITEM_DATA object array. Within that there is a another array as shown below.

CREATE OR REPLACE TYPE ITEM_DATA AS OBJECT
(
ITEM_CODE VARCHAR2 (50),
serial array_serial,
notes VARCHAR2 (1000)
);

CREATE OR REPLACE TYPE array_serial AS TABLE OF VARCHAR(20)

CREATE OR REPLACE TYPE obj_good_array AS VARRAY(500) OF ITEM_DATA;

I want to implement custom data type classes.

Was it helpful?

Solution

Install Oracle Developer Tools for Visual Studio, connect in server explorer using ODP.NET, and navigate to the User Defined Types node, then find your types and then run Custom Class Wizard to generate a class that you can use to pass data into your stored procedure.

Here is a walk through that should assist you:

http://apex.oracle.com/pls/apex/f?p=44785:24:106658667466148:::24:P24_CONTENT_ID,P24_PROD_SECTION_GRP_ID,P24_PREV_PAGE:4258,,24

If you are concerned about performance, use associative arrays instead and forgo UDTs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top