Dela via


SqlConnection.ServerProcessId Property

Definition

Gets the server process Id (SPID) of the active connection.

public:
 property int ServerProcessId { int get(); };
[System.ComponentModel.Browsable(false)]
public int ServerProcessId { get; }
public int ServerProcessId { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ServerProcessId : int
member this.ServerProcessId : int
Public ReadOnly Property ServerProcessId As Integer

Property Value

The server process Id (SPID) of the active connection.

Attributes

Remarks

Returns 0 if the connection is inactive on the client side.

Applies to