Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception for Function call with UDT Parameter: The invoked member is not supported in a dynamic ass

kazeApr 19 2016 — edited Apr 26 2016

DB: 11g

C# ODP.NET

Hello~!

I need some help getting past a exception.


The background is that I have been trying to pass a UDT as a parameter to an Oracle function.

I auto-generated the class through Visual Studio.

When I try to pass the UDT as a parameter and call the function, I encounter the exception: "The invoked member is not supported in a dynamic assembly."

To test if I'm calling functions correctly, I ran a simple function and I am able to call the simple function from my project without issue.

The test function simply takes a string and returns it with '!' concatenated.

In the same fashion, I created a simplified function with a UDT as parameter.

It is based on an object type that contains two strings and I am able to call it in SQL Developer.

However, when I try from my project, I encounter the exception "The invoked member is not supported in a dynamic assembly."

It's a general exception, and it looks like others have encountered it in different cases specific to certain products or when they have access to the assembly load, so I'm not sure where to go from here.

Any direction would be much appreciated.

Thanks,

~Keith

Stack Trace:

"   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()\r\n   at Oracle.DataAccess.Types.OracleUdt.GetAllReferencedAssemblies()\r\n   at Oracle.DataAccess.Client.RegAndConfigRdr.setudtmapping(Hashtable& s_mapUdtNameToMappingObj)\r\n   at Oracle.DataAccess.Types.OracleUdt.SetCustomTypeMappings()\r\n   at Oracle.DataAccess.Types.OracleUdt.GetUdtName(String customTypeName, String dataSource)\r\n   at Oracle.DataAccess.Client.OracleParameter.SetUDTFromCustomObject(OracleConnection conn, IOracleCustomType customObj, Int32 i)\r\n   at Oracle.DataAccess.Client.OracleParameter.PreBind_OracleObject(OracleConnection conn)\r\n   at Oracle.DataAccess.Client.OracleParameter.PreBind_Object(OracleConnection conn)\r\n   at Oracle.DataAccess.Client.OracleParameter.PreBind(OracleConnection conn, IntPtr errCtx, Int32 arraySize)\r\n   at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()\r\n   at ServiceRequestsNew.DBAccess.Execute(String storedProcedure, OracleParameter[] parameters) in C:\\Users\\Keith\\documents\\visual studio 2015\\Projects\\ServiceRequestsNew\\ServiceRequestsNew\\DBAccess.cs:line 38\r\n   at ServiceRequestsNew._Default.EchoObject(String serialNumber, String serialComment) in C:\\Users\\Keith\\documents\\visual studio 2015\\Projects\\ServiceRequestsNew\\ServiceRequestsNew\\Default.aspx.cs:line 247"

Object in Oracle:

create or replace type xxftk_serial_number_obj as object

(

    Serial_number    VARCHAR2 (4000),

    Serial_comment   VARCHAR2 (4000)

);

Notes:

This post has been answered by kaze on Apr 26 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2016
Added on Apr 19 2016
1 comment
1,612 views