SPId of Current Connection
Posted: Wed 25 May 2022 19:43
Is it possible to retrieve the @@spid of the current connection of TSQLConnection?
My issue is this,
when I connect the database on my app for the first time I execute, on the event AfterConnect, SELECT @@spid to store the spid,
but if my network broke e gets online again after a few moments, the connection is reestablished, but with new @@spid, and the event AfterConnect is not triggered.
My issue is this,
when I connect the database on my app for the first time I execute, on the event AfterConnect, SELECT @@spid to store the spid,
but if my network broke e gets online again after a few moments, the connection is reestablished, but with new @@spid, and the event AfterConnect is not triggered.