|
Lightweight 0.20250904.0
|
Represents an ODBC SQL error. More...
#include <SqlError.hpp>
Static Public Member Functions | |
| static SqlErrorInfo | FromConnectionHandle (SQLHDBC hDbc) |
| Constructs an ODBC error info object from the given ODBC connection handle. | |
| static SqlErrorInfo | FromStatementHandle (SQLHSTMT hStmt) |
| Constructs an ODBC error info object from the given ODBC statement handle. | |
| static void | RequireStatementSuccess (SQLRETURN result, SQLHSTMT hStmt, std::string_view message) |
| Asserts that the given result is a success code, otherwise throws an exception. | |
Public Attributes | |
| SQLINTEGER | nativeErrorCode {} |
| std::string | sqlState = " " |
| std::string | message |
Represents an ODBC SQL error.
NOTE: This is a simple wrapper around the SQL return codes. It is not meant to be comprehensive, but rather to provide a simple way to convert SQL return codes to std::error_code.
The code below is DRAFT and may be subject to change.
Definition at line 32 of file SqlError.hpp.
|
inlinestatic |
Constructs an ODBC error info object from the given ODBC connection handle.
Definition at line 39 of file SqlError.hpp.
|
inlinestatic |
Constructs an ODBC error info object from the given ODBC statement handle.
Definition at line 45 of file SqlError.hpp.
Referenced by Lightweight::SqlStatement::Execute(), and Lightweight::SqlStatement::LastError().
| SQLINTEGER Lightweight::SqlErrorInfo::nativeErrorCode {} |
Definition at line 34 of file SqlError.hpp.
| std::string Lightweight::SqlErrorInfo::sqlState = " " |
Definition at line 35 of file SqlError.hpp.
| std::string Lightweight::SqlErrorInfo::message |
Definition at line 36 of file SqlError.hpp.