I have an application that causes a dead lock at random. The issue I am
having is, when the deadlock occurs, my applications is not recieving
any errors from the DB. ie, during the deadlock SQLServer is returning
an empty recordset and user is seeing a blank screen. The app logic
does not go into the Try Catch statment in the C# code. I can't
understand why my app is not receiveing 1205 error from SQL server when
dead lock occurs.
Any ides why this is happening?
Thanks
_GJKRead the following article by Erland Sommarskog, SQL Server MVP:
http://www.sommarskog.se/error-handling-I.html#ADO.Net
especially this part: "If you use ExecuteReader, there are a few extra
precautions. If the stored procedure first produces a result set, and
then a message, you must first call .NextResult before you get an
exception, or, for an informational message, any InfoMessage event
handler is invoked."
Razvan|||In my case I am using SQLDataReader and sp being killed in the deadlock
is a simple select statement containing single resultset.
_GJK
Razvan Socol wrote:
> Read the following article by Erland Sommarskog, SQL Server MVP:
> http://www.sommarskog.se/error-handling-I.html#ADO.Net
> especially this part: "If you use ExecuteReader, there are a few
extra
> precautions. If the stored procedure first produces a result set, and
> then a message, you must first call .NextResult before you get an
> exception, or, for an informational message, any InfoMessage event
> handler is invoked."
> Razvan|||In my case I am using SQLDataReader and sp being killed in the deadlock
is a simple select statement containing single resultset.
_GJK
Razvan Socol wrote:
> Read the following article by Erland Sommarskog, SQL Server MVP:
> http://www.sommarskog.se/error-handling-I.html#ADO.Net
> especially this part: "If you use ExecuteReader, there are a few
extra
> precautions. If the stored procedure first produces a result set, and
> then a message, you must first call .NextResult before you get an
> exception, or, for an informational message, any InfoMessage event
> handler is invoked."
> Razvan
 
No comments:
Post a Comment