views:

22

answers:

1

Can I get a SPID from a SqlConnection Object (SQL-Server Database) in ADO.NET?

Is the SPID always the same for a connection object during its lifetime ?

+2  A: 

select @@SPID gives you the spid.

It should be constant, but may be recycled if you have connection pooling.

Neil Moss