Group: Forum Members
Posts: 18,
Visits: 33
|
Hi guys,
I'm trying to gracefully handle an SqlException, "Violation of UNIQUE KEY constraint...".
To stop the exception being thrown and showing the default error message, I'm setting the business objects ErrorSavingMode property to ConitnueOnError. In the forms AfterSave event I can see e.SaveUndoResult, which is set to CompletedWithExceptions.
So, in the forms AfterSave event I know that an exception occurred, but I'm not sure how to check which exception. I want to check this to make sure it really is a "Violation of UNIQUE KEY constraint..." exception and not something else.
Any suggestions?
Regards,
Bruce
|