差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
dotnet:sqlexception [2009/06/16 13:40] – ともやん | dotnet:sqlexception [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー | ||
---|---|---|---|
行 2: | 行 2: | ||
SqlException の Number に設定される番号の種類は以下の通りである。 | SqlException の Number に設定される番号の種類は以下の通りである。 | ||
- | 20未満はSQLServerに接続する前のエラーで、System.Data.SqlClient.TdsEnums(private class)に定義されている番号が設定される。 | + | 100以下はSQLServerに接続する前のエラーであり、.NET Framework 1.1 の場合は |
- | ^ 番号 | + | ※.NET Framework |
- | | -3|ZeroBytes | + | |
- | | -2|Timeout | + | |
- | | -1|Unknown | + | |
- | | 1|InsufficientMemory | + | |
- | | 2|AccessDenied | + | |
- | | 3|ConnectionBusy | + | |
- | | 4|ConnectionBroken | + | |
- | | 5|ConnectionLimit | + | |
- | | 6|ServerNotFound | + | |
- | | 7|NetworkNotFound | + | |
- | | 8|InsufficientResources | + | |
- | | 9|NetworkBusy | + | |
- | | 10|NetworkAccessDenied | + | |
- | | 11|GeneralError | + | |
- | | 12|IncorrectMode | + | |
- | | 13|NameNotFound | + | |
- | | 14|InvalidConnection | + | |
- | | 15|ReadWriteError | + | |
- | | 16|TooManyHandles | + | |
- | | 17|ServerError | + | |
- | | 18|SSLError | + | |
- | | 19|EncryptionError | + | |
- | | 20|EncryptionNotSupported | + | |
\\ | \\ | ||
- | 20より大きい番号は SQLServer の master データベースの dbo.sysmessages テーブルに定義されているものが発生する。\\ | + | 20以下の番号はSystem.Data.SqlClient.TdsEnums(private class)に定義されている番号が設定される。 |
+ | ^ 番号 | ||
+ | | -3|public const short ZERO_BYTES_READ = -3; |SQL_ZeroBytes | ||
+ | | -2|public const short TIMEOUT_EXPIRED = -2; |SQL_Timeout | ||
+ | | -1|public const short UNKNOWN_ERROR = -1; |SQL_Unknown | ||
+ | | 1|public const short NE_E_NOMEMORY = 0x01; |SQL_InsufficientMemory | ||
+ | | 2|public const short NE_E_NOACCESS = 0x02; |SQL_AccessDenied | ||
+ | | 3|public const short NE_E_CONNBUSY = 0x03; |SQL_ConnectionBusy | ||
+ | | 4|public const short NE_E_CONNBROKEN = 0x04; |SQL_ConnectionBroken | ||
+ | | 5|public const short NE_E_TOOMANYCONN = 0x05; |SQL_ConnectionLimit | ||
+ | | 6|public const short NE_E_SERVERNOTFOUND = 0x06; |SQL_ServerNotFound | ||
+ | | 7|public const short NE_E_NETNOTSTARTED = 0x07; |SQL_NetworkNotFound | ||
+ | | 8|public const short NE_E_NORESOURCE = 0x08; |SQL_InsufficientResources | ||
+ | | 9|public const short NE_E_NETBUSY = 0x09; |SQL_NetworkBusy | ||
+ | | 10|public const short NE_E_NONETACCESS = 0x0A; |SQL_NetworkAccessDenied | ||
+ | | 11|public const short NE_E_GENERAL = 0x0B; |SQL_GeneralError | ||
+ | | 12|public const short NE_E_CONNMODE = 0x0C; |SQL_IncorrectMode | ||
+ | | 13|public const short NE_E_NAMENOTFOUND = 0x0D; |SQL_NameNotFound | ||
+ | | 14|public const short NE_E_INVALIDCONN = 0x0E; |SQL_InvalidConnection | ||
+ | | 15|public const short NE_E_NETDATAERR = 0x0F; |SQL_ReadWriteError | ||
+ | | 16|public const short NE_E_TOOMANYFILES = 0x10; |SQL_TooManyHandles | ||
+ | | 17|public const short NE_E_SERVERERROR = 0x11; |SQL_SevereError | ||
+ | | 18|public const short NE_E_SSLSECURITYERROR = 0x12; |SQL_SSLError | ||
+ | | 19|public const short NE_E_ENCRYPTIONON = 0x13; |SQL_EncryptionError | ||
+ | | 20|public const short NE_E_ENCRYPTIONNOTSUPPORTED = 0x14; |SQL_EncryptionNotSupported | ||
+ | \\ | ||
+ | 21、および、101以上の番号は SQLServer の master データベースの dbo.sysmessages テーブルに定義されているものが発生する。\\ | ||
+ | 53などのように winerror.h に定義されている Win32エラーコードが設定される場合もある。\\ | ||
\\ | \\ | ||
[SQL]\\ | [SQL]\\ | ||
行 36: | 行 40: | ||
</ | </ | ||
{{: | {{: | ||
+ | \\ | ||
+ | で、結局何を信用すればいいか?\\ | ||
+ | .NET Framework 2.0 以降のデータプロバイダは、[[http:// | ||
\\ | \\ | ||
参考文献: | 参考文献: | ||
- | [[http:// | + | [[http:// |
+ | [[http:// |