I recently migrated my code from the native version of ODP.NET to the managed version, and all of a sudden, accessing the SafeMapping property on OracleDataAdapter gives the following exception:
System.NotSupportedException occurred
Message=Specified method is not supported.
Source=Oracle.ManagedDataAccess
StackTrace:
at Oracle.ManagedDataAccess.Client.OracleDataAdapter.get_SafeMapping()
Having read the purpose of SafeMapping, is it possible it simply isn't needed in Managed ODP.NET? Or, is there something I'm doing wrong? Such as, is there now an alternative way of doing what SafeMapping did?
Thanks.
I found the solution to this with the help of Alex Keh, a product manager from Oracle, for Windows and .NET. The solution is to set OracleDataAdapter.ReturnProviderSpecificTypes
to true
.
Full discussion can be found here.