472,794 Members | 3,565 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 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 4511
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:...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.