Rajkumar R

Rajkumar R

  • NA
  • 183
  • 219k

How to handle duplicate data in asp.net

Dec 23 2011 3:16 AM
I have a datatable that contain 4 records, These 4 records r also in the database
when second time i m tring to insert that data 
here i m getting an error like this
<b>Violation of PRIMARY KEY constraint 'PK_VMIS_30'. Cannot insert duplicate key in object 'VMIS_30'. The statement has been terminated. </b>
I want to show like an message box or in the response.write("DATA ALREADY EXIXTS") statement, Post solution for this
Thanks in advance



Answers (1)