Forum Stats

  • 3,817,367 Users
  • 2,259,322 Discussions
  • 7,893,760 Comments

Discussions

How to consume output parameter of type RECORD or TABLE

719717
719717 Member Posts: 2
edited Aug 27, 2009 10:16PM in ODP.NET
Hi all,
What type of OracleDbType in OracleParameter should I use to receive RECORD or TABLE as an output parameter?

Can anyone provide an example on how to call get_user and get_members stored procedures defined in the package definition below?

Thank you.

create or replace PACKAGE TEST_PKG
AUTHID CURRENT_USER
AS
type person_record is record (
name varchar2(100),
area varchar2(50)
);

type person_table is table of person_record;

procedure get_user(
i_name IN varchar2,
o_person_record OUT NOCOPY person_record);

procedure get_members(
i_area IN varchar2,
o_person_table OUT NOCOPY person_table);

END TEST_PKG;

Answers

  • Hi,

    RECORD is a PL/SQL only datatype.

    You might find User Defined Types (UDTs), which are available starting in 11.1.0.6.20 of ODP.NET, can meet your needs.

    http://download.oracle.com/docs/html/E10927_01/featUDTs.htm#CJAGCAID

    Regards,

    Mark
  • 719717
    719717 Member Posts: 2
    Hi Mark,

    Thank you for replying to my question,... I did have a doubt that it would be possible to consume them from .NET, now you have confirm that. I will ask the developer of the stored procedure to change their output parameters.

    Cheers
This discussion has been closed.