Quantcast
Channel: SQL Server Database Engine Forum
Viewing all articles
Browse latest Browse all 15872

Concurrent connection -IF EXISTS(...) fails

$
0
0

Hi,

I am having a webservice , which uses a stored procedure to insert data to db. I am using the IF EXISTS () 
condition to check whether duplicate data is being inserted to the table. But when the server traffic at peak IF exists is failing resulting in the duplicate insertion of the data. How i can make a lock on the table which will not affect the performance.Please guide.



Viewing all articles
Browse latest Browse all 15872


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>