J
jason
I have found one other thread on this topic, but the responses only
described "bad" ways to fix the problem. I'd like to know if there are
any "good" ways to fix the problem
I have a class with a private, instance-level SqlDataReader reference
(so it's not being shared by multiple objects at runtime). That
SqlDataReader is only used to ExecuteReader once, and then build a
DataTable out of the results. However, we occasionally get Deadlocks on
the READER when the ExecuteReader is attempting this read.
The "bad" fix that I read was to change the reader characteristics to
NOLOCK to allow dirty reads. This really isn't that bad, actually,
because I only care about the data as it was at the moment of
execution, if it changes after that, It will be caught in a subsequent
execution of this method.
But, are there any "good" ways to fix this issue?
Thanks for any help,
Jason
described "bad" ways to fix the problem. I'd like to know if there are
any "good" ways to fix the problem
I have a class with a private, instance-level SqlDataReader reference
(so it's not being shared by multiple objects at runtime). That
SqlDataReader is only used to ExecuteReader once, and then build a
DataTable out of the results. However, we occasionally get Deadlocks on
the READER when the ExecuteReader is attempting this read.
The "bad" fix that I read was to change the reader characteristics to
NOLOCK to allow dirty reads. This really isn't that bad, actually,
because I only care about the data as it was at the moment of
execution, if it changes after that, It will be caught in a subsequent
execution of this method.
But, are there any "good" ways to fix this issue?
Thanks for any help,
Jason