SqlErrorInfo class
namespace: Serenity.Services.SqlErrors assembly: Serenity.Net.Services
Information extracted from a database constraint violation.
public class SqlErrorInfo
Public Members
| name | description |
|---|---|
| SqlErrorInfo() | The default constructor. |
| ColumnName { get; } | Gets the first column name involved in the violation, if any. |
| ColumnNames { get; set; } | Gets or sets the names of the columns involved in the violation, if they could be determined. |
| ConstraintName { get; set; } | Gets or sets the name of the constraint or index involved, if it could be determined. |
| ErrorNumber { get; set; } | Gets or sets the provider error number, if available. |
| KeyValue { get; set; } | Gets or sets the key value that caused the violation, if it could be determined. |
| Message { get; set; } | Gets or sets the original exception message. |
| ReferencedTableName { get; set; } | Gets or sets the name of the referenced (foreign) table for a foreign key violation, if it could be determined. |
| ServerType { get; set; } | Gets or sets the server type the exception came from, if it could be determined. |
| SqlState { get; set; } | Gets or sets the SQL state code, if available. |
| TableName { get; set; } | Gets or sets the name of the table involved in the violation, if it could be determined. |
| Type { get; set; } | Gets or sets the type of the constraint violation. |
| ToString(…) | Formats this error info as a localized validation message. |
See Also
- Source: SqlErrorInfo.cs