I need to break UNIQUE restrictions in a special way with the C # application that I am developing. Is it possible to assume that Error 2627 will always correspond to a violation of this kind, so that I can use
if (ThisSqlException.Number == 2627) { // Handle unique constraint violation. } else { // Handle the remaing errors. }
?
sql-server-2005 unique-constraint
User Jun 26 2018-11-11T00: 00Z
source share