NativeSqlConnectionException.SqlState 屬性

定義

指出錯誤的 Microsoft SQL Server SQL 狀態。

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

屬性值

String

五個字元的 String 值,在 ANSI SQL 標準之後指出錯誤碼

備註

SqlState屬性是用來取得在處理 SQL 語句期間發生錯誤時,提供者所傳回的錯誤碼。

適用於