Page 1 of 1

Oracle Type as Table

Posted: Tue 23 Jun 2020 17:55
by ejamnadas
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..

Re: Oracle Type as Table

Posted: Thu 25 Jun 2020 16:35
by ejamnadas
Bump..

Re: Oracle Type as Table

Posted: Wed 01 Jul 2020 17:14
by Shalex
Refer to the sample at viewtopic.php?t=30250.