建構新的 SqlError。
包含此類別的組件與 SQLAccess.dll 具有 Friend 關聯性 (Relationship)。此類別是預定由 SQL Server 所使用。如需其他資料庫,請使用該資料庫所提供的裝載機制。
命名空間 (Namespace):System.Data.SqlClient
組件 (Assembly):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