SqlExecutionException.Commands 屬性

定義

取得例外狀況發生時所執行的 SQL 命令。

public:
 property System::String ^ Commands { System::String ^ get(); };
public string Commands { get; }
member this.Commands : string
Public ReadOnly Property Commands As String

屬性值

例外狀況發生時所執行的 SQL 命令。

範例

下列程式碼範例示範如何存取 Commands 例外狀況類型的 屬性 SqlExecutionException 。 此程式碼範例是提供給 類別之較大範例的 SqlServices 一部分。

Console.WriteLine("  Commands: {0}",
    sqlExecutionException.Commands);
Console.WriteLine("  Commands: {0}", _
    sqlExecutionException.Commands)

適用於