I have a table which I'm only
on Insert, Sometimes it used a session lock (
I have a program using ADO which
Select from the table using the
RecordSet::Open command to open a simple sequential query.
Select * from t1 where id >= @from_id And >= @to_id`
Select top(10) * from t1 where id >= @id Order by id
The id column is an
When I'm open the query, sometimes I'm getting a deadlock. (the table is locked by the
Insert query and the id column's index is locked by the
I'm trying to prevent the deadlocks.
Should I open the select queries
WITH(NOLOCK)? may it prevent the deadlocks?