共用方式為


System.Data.SqlClient.SqlError 建構函式 (System.Int32, System.Byte, System.Byte, System.String, System.String, System.String, System.Int32)

更新:2007 年 11 月

建構新的 SqlError。

包含此類別的組件具有與 SQLAccess.dll 的 friend 關聯性 (Relationship),預定用於 SQL Server。如要在其他資料庫使用,請使用該資料庫所提供的裝載機制。

命名空間:System.Data.SqlClient

組件:System.Data (在 System.Data.dll 中)

 SqlError(ByVal infoNumber As Integer, ByVal errorState As Byte, ByVal errorClass As Byte, ByVal server As String, ByVal errorMessage As String, ByVal procedure As String, ByVal lineNumber As Integer)
 internal SqlError (int infoNumber, Byte errorState, Byte errorClass, string server, string errorMessage, string procedure, int lineNumber);

參數

參數

說明

infoNumber

錯誤代碼

errorState

來自 SQL Server,代表錯誤、警告或「找不到資料」的錯誤代碼

errorClass

錯誤的嚴重性等級

server

發生錯誤的 SQL Server 執行個體的名稱

errorMessage

錯誤訊息的文字

procedure

產生錯誤的預存程序名稱

lineNumber

預存程序內包含錯誤的行號

版本資訊

.NET Framework

支援版本:2.0