title: Best way to catch sql unique constraint violations in c# during inserts
body: <p>I have a loop in c# that inserts into a table. pretty basic stuff. Is there something insdie the exception object that's thrown when a unique constraint is violated that i can use to see what the offending value is?</p>
  
  <p>Or is there a way to return it in the sql? i have a series of files whose data im loading into tables and i'm banding my head trying to find the dupe.</p>
  
  <p>I know I could slap together something purely IO-based in code that can find it but I'd like something I could use as a more permanent solution. </p>