How to lock a table for inserting in sql?
Posted
by Nandini
on Stack Overflow
See other posts from Stack Overflow
or by Nandini
Published on 2010-03-26T09:54:33Z
Indexed on
2010/03/26
10:03 UTC
Read the original article
Hit count: 263
sql-server
|sql-server-2005
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
© Stack Overflow or respective owner