Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

How to Detect Unique Key Violation And Priamry Key Violation Seperately

$
0
0

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



Viewing all articles
Browse latest Browse all 8428

Trending Articles