Oracle Type as Table

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ejamnadas
Posts: 2
Joined: Tue 23 Jun 2020 17:43

Oracle Type as Table

Post by ejamnadas » Tue 23 Jun 2020 17:55

I'm trying to work with OracleTypes in c#. here are the types:

create type ocl.ingredient sa object( ingredient_id int, weight int)
create type ocl.recipe as table of ingredient;

And I have a stored procedure:

create procedure test_proc (v_table as recipe)
as
begin
...
end;
/

My Question is, how can you I pass an the ocl.recipe type (which is a table of ingredient)
to this procedure? I looked at the documentation, and I am able to create the object (see below)
but how do I create an array of these and pass it to the procedure:

OracleObject ingredient = new OracleObject("ocl.ingredient", con);
ingredient[ingredient_id] = 1;
etc..

ejamnadas
Posts: 2
Joined: Tue 23 Jun 2020 17:43

Re: Oracle Type as Table

Post by ejamnadas » Thu 25 Jun 2020 16:35

Bump..

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Oracle Type as Table

Post by Shalex » Wed 01 Jul 2020 17:14

Refer to the sample at viewtopic.php?t=30250.

Post Reply