Enum SqlServerErrorCode
Some of the error codes for Microsoft SQL Server.
Namespace: Kros.Data.SqlServer
Assembly: Kros.Utils.dll
Syntax
public enum SqlServerErrorCode
Remarks
Error code is in exception System.Data.SqlClient.SqlException, in the System.Data.SqlClient.SqlException.Number property. List of all error codes is at https://msdn.microsoft.com/en-us/library/cc645603.aspx.
Fields
Name | Description |
---|---|
CannotInsertDuplicateKeyRow | Cannot insert duplicate key row in object 'objectName' with unique index 'indexName'. |
ConstraintViolation | The ... statement conflicted with the ... constraint. The conflict occurred in database ..., table .... |
DatabaseAlreadyExists | Database 'name' already exists. Choose a different database name. |
DuplicateKeyViolation | Violation of ... constraint 'constraintName'. Cannot insert duplicate key in object 'objectName'. |
InvalidColumnName | Invalid column name 'name'. |
InvalidObjectName | Invalid object name 'name'. |
ServerNotAccessible | A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) |
TheDatabaseCouldNotBeExclusivelyLocked | The database could not be exclusively locked to perform the operation. |
Unknown | Unknown error code. |