Detect OracleException "Value length exceeds the parameter size" programatically

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Detect OracleException "Value length exceeds the parameter size" programatically

Post by hansjoergp » Wed 12 Aug 2020 09:50

Is there any possiblity to detect an OracleException with an message "Value length exceeds the parameter size" without comparing the message text? The errorcode is 0x80004005

Best regards
Hansjörg

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Detect OracleException "Value length exceeds the parameter size" programatically

Post by Shalex » Thu 20 Aug 2020 12:17

1. You can turn off the generation of the "Value length exceeds the parameter size" error. For this, specify this line of code only once in your application (silent truncation):

Code: Select all

    OracleUtils.ParameterValueTrimming = true;
2. We will investigate the possibility to assign unique ErrorCode for this exception.

Post Reply