SqlExecutionException.SqlFile 屬性

定義

取得檔案的路徑和名稱,該檔案包含例外狀況發生時所執行的 SQL 命令。

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

屬性值

String

檔案的路徑和名稱,該檔案包含例外狀況發生時所執行的 SQL 命令。

範例

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

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

適用於