Hi
This topic was discussed long... back, where it was mentioned there is no way to recognize which integrity constraint occured when you get "MysqlIntegrityConstraintViolationException" in your code.
I am raising it again in the hope that some answer might be there now
I am using mysql with
java and I have to generate custom messages when some DB exception occurs. While inserting or updating data , I need to generate separate message for duplicate key violation and foreign key violation on receiving
MysqlIntegrityConstraintViolationException
exception
Can anybody suggest the best way to do it ?