SPID of a SqlConnection (SQL-Server) in ADO.NET
Can I get a SPID from a SqlConnection Object (SQL-Server Database) in ADO.NET?
Is the SPID always the 开发者_StackOverflow社区same for a connection object during its lifetime ?
select @@SPID
gives you the spid.
It should be constant, but may be recycled if you have connection pooling.
精彩评论