470,647 Members | 1,186 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Handle table of user-defined type, passed from Oracle, in C#

Hello

I am running ASP.NET (C#) using Oracle (PL/SQL, provider ODP.NET
11.1.0.6.20) and I have a procedure which at the moment returns a table of
records. The code below demonstrates this.

TYPE R_OutData_tab IS RECORD ( ... );
TYPE OutData_tab IS TABLE OF R_OutData_tab INDEX BY BINARY_INTEGER;

PROCEDURE PROPERTY_GET (tOutData OUT <packagename>.OutData_tab);
Since .NET doesn't support Oracle records I'm looking into rewriting the
procedure so that it returns a table of a user defined type instead. The
code below demonstrates this.

create type person_type as object (name varchar2(30), address varchar2(60),
age varchar2(3));

TYPE person_table IS TABLE OF odp_obj1_sample_person_type;

PROCEDURE PERSONS_GET(out_persons OUT person_table);
I know how to handle a single user-defined type in .NET returned from a
Oralce procedure but what I need to do now is to receive a table of a user
defined type. Is this supported in .NET?

Regards // Mikael
Nov 13 '08 #1
1 4408
Mikael Vehkajärvi wrote:
Hello

I am running ASP.NET (C#) using Oracle (PL/SQL, provider ODP.NET
11.1.0.6.20) and I have a procedure which at the moment returns a table of
records. The code below demonstrates this.

TYPE R_OutData_tab IS RECORD ( ... );
TYPE OutData_tab IS TABLE OF R_OutData_tab INDEX BY BINARY_INTEGER;

PROCEDURE PROPERTY_GET (tOutData OUT <packagename>.OutData_tab);
Since .NET doesn't support Oracle records I'm looking into rewriting the
procedure so that it returns a table of a user defined type instead. The
code below demonstrates this.

create type person_type as object (name varchar2(30), address varchar2(60),
age varchar2(3));

TYPE person_table IS TABLE OF odp_obj1_sample_person_type;

PROCEDURE PERSONS_GET(out_persons OUT person_table);
I know how to handle a single user-defined type in .NET returned from a
Oralce procedure but what I need to do now is to receive a table of a user
defined type. Is this supported in .NET?
Why don't you return a cursor?

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 14 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by (Pete Cresswell) | last post: by
2 posts views Thread by Randy | last post: by
2 posts views Thread by Michael Ramey | last post: by
12 posts views Thread by Aaron Smith | last post: by
9 posts views Thread by lli | last post: by
5 posts views Thread by Jonah Bishop | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.