System.Data
[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]
1.0.3300.0
1.0.5000.0
2.0.0.0
Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.
System.Object
This class is created by the .NET Framework Data Provider for SQL Server when an error occurs. An instance of is created and managed by the , which in turn is created by the class.
Messages with a severity level of 10 or less are informational and indicate problems caused by mistakes in information that a user has entered. Severity levels from 11 through 16 are generated by the user, and can be corrected by the user. Severity levels from 17 through 25 indicate software or hardware errors. When a level 17, 18, or 19 error occurs, you can continue working, although you might not be able to execute a particular statement.
The remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server usually closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command.
For more information on errors generated by ssNoVersion, see Cause and Resolution of Database Engine Errors. For more information about severity levels, see Database Engine Error Severities.
Collects information relevant to a warning or error returned by SQL Server.
Property
System.Byte
To be added: an object of type 'byte'
Messages with a severity level of 10 or less are informational and indicate problems caused by mistakes in information that a user has entered. Severity levels from 11 through 16 are generated by the user, and can be corrected by the user. Severity levels from 17 through 25 indicate software or hardware errors. When a level 17, 18, or 19 error occurs, you can continue working, although you might not be able to execute a particular statement.
The remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server usually closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command.
For more information on errors generated by SQL Server, see SQL Server Books Online.
Gets the severity level of the error returned from SQL Server.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added: an object of type 'int'
Line numbering starts at 1. If the value is 0, the line number is not applicable.
For more information on errors generated by SQL Server, see SQL Server Books Online.
Gets the line number within the Transact-SQL command batch or stored procedure that contains the error.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
To be added
Gets the text describing the error.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added: an object of type 'int'
The following table describes the possible values for this property:
-
Source of Error
SqlError.Number
SqlError.State
SqlException has inner Win32Exception (beginning with.NET Framework 4.5)
-
Error from server
Server error code
This number corresponds to an entry in the master.dbo.sysmessages table.
Typically greater than 0
No
-
Connection timeout
-2
0
Yes (Number = 258)
-
Communication error (non-LocalDB)
Win32 error code
0
Yes (Number = Win32 error code)
-
Communication error (LocalDB)
Win32 error code
0
No
-
Encryption capability mismatch
20
0
No
-
Failed to start LocalDB
Win32 error code
0
No
-
Read-only routing failure
0
0
No
-
Server had severe error processing query
0
0
No
-
Processed cancellation while parsing results
0
0
No
-
Failed to create user instance
0
0
No
For more information on errors generated by SQL Server, see SQL Server Books Online.
Gets a number that identifies the type of error.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
To be added
Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
To be added
Gets the name of the instance of SQL Server that generated the error.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
To be added
Gets the name of the provider that generated the error.
1.0.5000.0
2.0.0.0
Property
System.Byte
To be added: an object of type 'byte'
State is only set for errors that are received from the server.
For more information on errors generated by ssNoVersion, see Understanding Database Engine Errors.
Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.
1.0.5000.0
2.0.0.0
Method
System.String
The string is in the form "SqlError:", followed by the , and the stack trace. For example:
SqlError:UserId or Password not valid. <stack trace>
Gets the complete text of the error message.
The complete text of the error.
1.0.5000.0
2.0.0.0