Neo X wrote:Hi,
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:
Message=Specified method is not supported.
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?
Features Not Supported in ODP.NET, Managed Driver Namespace Classes / Enumerations / Interfaces Unsupported Method / Property / Event [ snip ] Oracle.ManagedDataAccess.Client OracleDataAdapter SafeMapping property [ snip ]
If you have Oracle values that exceed the precision or size of their .NET counterparts then you could lose data/precision or get an overflow exception when converting to the .NET type.OK, I understand the purpose of SafeMapping. I'm really trying to understand if it's still required in Managed ODP.NET. As it's not supported, and if it's the case that values come back from the database that are not compatible with their .NET counterparts, then how do you manage this in Managed ODP.NET?
You could spin up a quick test that selects a valid Oracle value that is larger than the .NET counterpart for example: