i want to detect unique key violation and primary key violation separately
by using
catch(SqlException ex)
if(ex==2627)
///then some code
but this number is same for unique key and primary key
how to detect these two differently
thanks
i want to detect unique key violation and primary key violation separately
by using
catch(SqlException ex)
if(ex==2627)
///then some code
but this number is same for unique key and primary key
how to detect these two differently
thanks