ServerConnection.TransactionDepth 属性
Gets the current transaction depth for the referenced connection.
命名空间: Microsoft.SqlServer.Management.Common
程序集: Microsoft.SqlServer.ConnectionInfo(在 Microsoft.SqlServer.ConnectionInfo.dll 中)
语法
声明
Public ReadOnly Property TransactionDepth As Integer
Get
用法
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
属性值
类型:System.Int32
An Int32 value that specifies the current transaction depth for the referenced connection.
注释
A connection can experience nested transactions. The transaction depth refers to the number of nested transactions.
示例
C#
ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.TransactionDepth);
PowerShell
$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.TransactionDepth
请参阅
参考
Microsoft.SqlServer.Management.Common 命名空间