How to lock a table for inserting in sql?
- by Nandini
hi,
i have a web application in which i have a page named 'Data'.Many people will try to insert data into the table at a given time.So the reference no other than the primary key will get duplicated which should not be permitted.For inserting the data into the DB table, i am using a stored procedure in SQL.In my vb.net web application, i am using Business layer with enterprise library for calling the stored procedure.Now i want to lock the table for inserting so that when multiple user inserts, there wont be any complication.How can i do this?Please advice
Regards