.Net Oracle.ManagedDataAccess Exception Handling (ORA-00001: unique constraint (x) violated)

697 Views Asked by At

I want to detect ORA-0001 from my .net application which uses Oracle.ManagedDataAccess client to connect to Oracle.

When I inspect the details of OracleException which was throwed when constraint violated, that is What I see;

enter image description here

I could not find a better way for detecting constraint violation other then parsing the Message property of exception.

enter image description here

What is the best practice of that ? Any better, convenient way appricated.

P.S : I dont want to write pl/sql for that.

Thanks

0

There are 0 best solutions below