dotnet:sqlexception

文書の過去の版を表示しています。


SqlException クラス (System.Data.SqlClient)

 SqlException の Number に設定される番号の種類は以下の通りである。

 恐らく100以下はSQLServerに接続する前のエラーである。  20以下の番号はSystem.Data.SqlClient.TdsEnums(private class)に定義されている番号が設定される。

番号 補足
-3ZeroBytes
-2Timeout
-1Unknown
1InsufficientMemory
2AccessDenied
3ConnectionBusy
4ConnectionBroken
5ConnectionLimit
6ServerNotFound
7NetworkNotFound
8InsufficientResources
9NetworkBusy
10NetworkAccessDenied
11GeneralError
12IncorrectMode
13NameNotFound
14InvalidConnection
15ReadWriteError
16TooManyHandles
17ServerError
18SSLError
19EncryptionError
20EncryptionNotSupported


 21、および、101以上の番号は Windows So SQLServer の master データベースの dbo.sysmessages テーブルに定義されているものが発生する。
 53などのように winerror.h に定義されている Win32エラーコードが設定される場合もあるようである。

 [SQL]

USE master
SELECT * FROM dbo.sysmessages WHERE msglangid = 1041

select sysmessages

参考文献:
SQL Exception because of a timeout

  • dotnet/sqlexception.1261629215.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)