Using UDT parameter without ODP.NET's UDT-to-.NET type mapping
705416Jun 5 2009 — edited Oct 5 2009The 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.