473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 4543
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: (Pete Cresswell) | last post by:
Seems like creating a #temp table is kind of useless because it cannot be bound to a subform. OTOH, seems like a waste of resources to populate work tables in the "real" database - both because...
2
by: Randy | last post by:
Hello All, I'm trying to discover the best way to handle the situation where you have a datagrid in your app and someone changes a cell but doesn't leave that cell (so there's the little pencil...
2
by: Michael Ramey | last post by:
Howdy, I think I have a good question! I'm creating a usercontrol, and within this usercontrol, I'm dynamically creating controls (imagebuttons to be exact), that the user can click on which...
12
by: Aaron Smith | last post by:
What is the best way to handle data in a multiple user environment? We have forms that will allow users to add edit and delete data from a table on SQL server. The data could be edited on multiple...
9
by: lli | last post by:
Hi Guys, I am a new cgi programmer. Now I need to design a web application: 1. first, user login by their username and password in a form (login form). When users click submit button it connect...
6
by: somaskarthic | last post by:
Hi This is somas here. I asked query about detecting the browser close event using javascript. I want to detect the event only when the X button in the top right corner is clicked and not else...
5
by: Jonah Bishop | last post by:
I'm developing a photo album web application for use on a web site, and I'm running into a problem with lengthy operations. My application allows the user to import a number of images at once into...
0
by: planetthoughtful | last post by:
Hi All, I'm building an app in Acc2K3 (with an SQLServer 2000 backend) that will be used by several users to action error records in a queue. The only real issue I need to accommodate is that...
2
by: pietlinden | last post by:
I've been given the task of building a database for a manufacturer's representative. He basically imports product and resells it. He currently has this spreadsheet that's fairly complex. (Either...
5
by: Ben | last post by:
Hi! I have a trigger created for Customer table. My front-end is access. What is the best approach to handle a trigger result when adding a new customer record? Below is the trigger script:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.