7
Reply

Uniqueness on multiple columns - update query

Riddhi Valecha

Riddhi Valecha

Feb 18 2016 12:46 AM
331
I have made unique keys for four columns in sql server -
 
I want that I want to check this uniqueness in asp.net c# (front-end)...
 
I want to know which approach is better - back-end keys or front-end checking ??
 
Because, the record gets updated ..
 
Eg - I select a record from Gridview , and make the EmployeeID, SubjectID, same - still - instead of giving error, it gets updated.
 
How to stop the updation at this point ?
 
Please guide and help !
 
 
Also, I received a reply -
 
Hi ,
if you have to check the uniqueness of more then a column so you should have to check from back end with stored procedure, Proc make it fast to check
 
Please guide further... Please help

Answers (7)