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!

Method not found exception is raised in Oracle.DataAccess.dll

user-pgz02Feb 9 2023

Currently, we are using the ODP.NET-19.3 Oracle.DataAccess.dll (product version - 4.122.19.1.20190703) in our projects.

We are facing the “Specified cast is not valid” error issue when casting the large precision number (29 digits or more) to decimal.

The propery SuppressGetDecimalInvalidCastException is introduced in the ODP.NET-19.10. This will handle our issue.

So, I have removed the old Oracle.DataAccess.dll references and used the latest Oracle.DataAccess.dll (product version - 4.122.19.1.20220601) in our projects and used the newly added property SuppressGetDecimalInvalidCastException when initializing the OracleDataAdapter class. The project is compiled successfully but during the runtime Method not found: ‘Void Oracle.DataAccess.Client.OracleDataAdapter.set_SuppressGetDecimalInvalidCastException(Boolean)’ exception is thrown.

var adapter = new OracleDataAdapter() //Old Code

var adapter = new OracleDataAdapter() { SuppressGetDecimalInvalidCastException = true } //New Code

Why the replacing the old Oracle.DataAccess.dll with the latest Oracle.DataAccess.dll is not working?

Do I need to install(upgrade) the latest ODP.NET 19.10 - Oracle client to solve the issue?

Can anyone help to solve the issue?

This post has been answered by Alex Keh-Oracle on Feb 9 2023
Jump to Answer
Comments
Post Details
Added on Feb 9 2023
3 comments
871 views