Condividi tramite


Proprietà ServerConnection.TransactionDepth

Gets the current transaction depth for the referenced connection.

Spazio dei nomi  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

Sintassi

'Dichiarazione
Public ReadOnly Property TransactionDepth As Integer 
    Get
'Utilizzo
Dim instance As ServerConnection 
Dim value As Integer 

value = instance.TransactionDepth
public int TransactionDepth { get; }
public:
property int TransactionDepth {
    int get ();
}
member TransactionDepth : int
function get TransactionDepth () : int

Valore proprietà

Tipo: System.Int32
An Int32 value that specifies the current transaction depth for the referenced connection.

Osservazioni

A connection can experience nested transactions. The transaction depth refers to the number of nested transactions.

Esempi

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.TransactionDepth);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.TransactionDepth

Vedere anche

Riferimento

ServerConnection Classe

Spazio dei nomi Microsoft.SqlServer.Management.Common

Altre risorse

Transaction Log Architecture