3
Answers

Prevent the insertion of duplicate records

Usha Raj

Usha Raj

9y
602
1
I want to prevent the insertion of duplicate records,if the record is already exists then I want to send a message the record already exists.

please find the below file,It contains my database image.

I want to insert the data through regid,diffrent users can enter the same data but when the same user trying to enter same record 2 time then I should prevent.
   In the below picture I rounded with blue(Regid:45),the user can able to enter like that but when the user is trying to enter same details with same regid(45) then I should restrict.Can any one tell me how to write the code for this


Attachment: capture.rar

Answers (3)
0
Administrator

Administrator

Admin 2.3k 1.3m 21y
Thank You!! This was what I needed to find :)
0
Administrator

Administrator

Admin 2.3k 1.3m 21y
to use any custom or such library in VS.NET you need to add the reference first. right click on References in the Solution Explorer then select Add Reference you'll be able to search the ".NET", "COM" and also Browse for the component. Forget the projects unless you are writing a component. Good Luck