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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Using UDT parameter without ODP.NET's UDT-to-.NET type mapping

705416Jun 5 2009 — edited Oct 5 2009
The OracleCommand's Execute methods (ExecuteNonQuery, ExecuteReader, etc.) not only execute the query, but they also translate any Oracle user-defined types to .NET classes via its own mapping scheme.

The problem is that this mapping scheme stinks--it requires a whole lot of hacky code to work, and it doesn't even allow booleans...even though you explicitly write the conversion code. From what I gather so far, it is making reflection-type calls to read public-only properties decorated with the OracleObjectMapping attribute in order to make the type transformation. I looked briefly into reverse engineering this, but the code the does all its magic is in method OpsPrmFreeUdtInObjects of OraOps11w.dll (unmanaged).

Has anyone managed to suppress the OracleCommand's mapping of UDTs using .NET-managed code? And further, what did your own translation code entail?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2009
Added on Jun 5 2009
5 comments
3,199 views