Page 1 of 1

Getting an object type that is inside a package

Posted: Tue 04 Dec 2018 13:51
by magoicochea
Hello

I am using the .NET Standard 9.6.646 version of the library.

I have the following type defined under a package

Code: Select all

  TYPE t_error_record IS RECORD(

    ERROR_CODE VARCHAR2(50),

    error_text VARCHAR2(2000));

However, when I try to access this using

Code: Select all

OracleType.GetObjectType("MYPACKAGE.t_error_record", conn);
or

Code: Select all

OracleType.GetObjectType("t_error_record", conn);
I get the "Object does not exist" error. I read in an old thread that this was not supported yet, but that was 8 years ago. I was wondering if this is now supported by dotConnect.

Re: Getting an object type that is inside a package

Posted: Wed 05 Dec 2018 12:34
by Pinturiccio
magoicochea wrote:I read in an old thread that this was not supported yet, but that was 8 years ago. I was wondering if this is now supported by dotConnect.
It is an Oracle restriction, not the dotConnect for Oracle one. You can't use a type defined inside the package beyond this package.
As Shalex wrote in the post that you specified, you can create a global type outside the package and then use it.