How can I know if an SQLexception was thrown because of foreign key violation?
Asked 2010-03-08T17:42:31.563
25
I want to tell the user that a record was not deleted because it has child data, but how can I be sure that the exception was thrown because of a foreign key violation? I see that there a sqlexception class that is used for all sql exception.