UnexpectedErrorDuringQueryException Class
Thrown when an unexpected error occurred during an SQL query.
public sealed class UnexpectedErrorDuringQueryException : HAKOM.ErrorHandling.Core.Net.Api.HakomExceptionInheritance System.Object 🡒 System.Exception 🡒 HakomException 🡒 UnexpectedErrorDuringQueryException
Remarks
Section titled “Remarks”This may be due to an error with the database connection or an incorrect query. Inspect the Query and QueryError properties for more information and make sure a stable connection can be maintained with the underlying database.
This exception is identified by error code HK12030.
Properties
Section titled “Properties”UnexpectedErrorDuringQueryException.DatabaseErrorCode Property
Section titled “UnexpectedErrorDuringQueryException.DatabaseErrorCode Property”Whenever available, this property will contain the System.Exception.HResult of the underlying System.Data.Common.DbException.
public int DatabaseErrorCode { get; }Property Value
Section titled “Property Value”UnexpectedErrorDuringQueryException.EquivalentHttpStatusCode Property
Section titled “UnexpectedErrorDuringQueryException.EquivalentHttpStatusCode Property”When unhandled within an HTTP request, this exception produces HTTP 500 (Internal Server Error).
protected override System.Net.HttpStatusCode EquivalentHttpStatusCode { protected get; }Property Value
Section titled “Property Value”UnexpectedErrorDuringQueryException.Query Property
Section titled “UnexpectedErrorDuringQueryException.Query Property”The query, which caused the problem.
public string Query { get; }Property Value
Section titled “Property Value”UnexpectedErrorDuringQueryException.QueryError Property
Section titled “UnexpectedErrorDuringQueryException.QueryError Property”The error reported by the data base.
public string QueryError { get; }Property Value
Section titled “Property Value”UnexpectedErrorDuringQueryException.SqlState Property
Section titled “UnexpectedErrorDuringQueryException.SqlState Property”Whenever available, this property will contain a standard SQL 5-character return code indicating the success or failure for the specific database.
public string? SqlState { get; }