I was wondering if anyone had a more elegant way to check for unique key exceptions from SQL in .NET other than parsing the error message? Right now I am calling the sproc
Obvious answer: Attempt to fetch that value from the database before inserting (or updating) it and notify the user before you do the insert.
Alternative answer: Check for the uniqueness inside the SP and return that as an error message from the SP, then you don't have to parse any errors. They're all bad.