error handling - How can I handle lost client connection in a SQL Server T-SQL try-catch block? -
Tiskyuel start and BEGIN catch block pattern does not catch errors due to incorrect client connections. How can I hold and handle a lost customer connection?
I have is that I am setting a flag that indicates the processing, while a loop processing of individual transactions and a catch block set that flag on the error, but if the client If the connection is lost, my catch block is not executed.
PSUEDOCODE:
Start SET FlagToIndicateProcessing = 1 Loop Start to Start Work transmit loop end set Krenmuly SET FlagToIndicateProcessing = 0 end cache set group set SEV FlagToIndicateProcessing = 0 finally catches
right.
A client lost connection to effectively implantation and rollback SQL Server: You just stop executing SQL, so will not execute catch block.
Why are you batching different transactions in a loop? It can suggest solutions to somebody often, a SQL call is a unit of work.
Comments
Post a Comment