If I have ORA-12899 returned from an insert or update statement. How can I extract the column name from the OracleException without parsing the string?
ORA-12899: value too large for column "SCHEMA"."TABLENAME"."COLUMNNAME" (actual: 175, maximum: 23).
I would like to do something like this:
try
{
// Insert code.
}
catch (OracleException orclEx)
{
if (orclEx.Number == 12899)
{
string columnName = GetColumnName(orclEx);
throw new Exception(columnName + " value is too long.", orclEx);
}
}
finally
{
// Finally code
}