Helpers for getting error information on ODBC handles.
Types
OdbcError = object state*: OdbcState native*: TSqlInteger msg*: string
- Source Edit
OdbcErrors = object retVal*: TSqlSmallInt procName*: string handleTy*: string errs*: seq[OdbcError]
- Source Edit
OdbcException = object of CatchableError
- Source Edit
Procs
proc getDiagMsg(handle: SqlHandle; handleKind: TSqlSmallInt): seq[OdbcError] {. ...raises: [], tags: [].}
- Get all messages (warnings and errors) associated with actions done with the given handle. Source Edit
proc raiseOdbcException(errs: OdbcErrors) {....raises: [OdbcException], tags: [].}
- Source Edit
proc raiseOdbcException(errs: openArray[OdbcError]) {....raises: [OdbcException], tags: [].}
- Source Edit
Macros
macro odbcSimpleCheck(handle: SqlHandle; kind: TSqlSmallInt; stmt, actions: untyped): TSqlSmallInt
- If stmt evaluates to false, use the return value of the ODBC call to get all errors. Source Edit
Templates
template odbcCheck(handle: SqlHandle; kind: TSqlSmallInt; stmt)
- Source Edit
template odbcCheckRet(handle: SqlHandle; kind: TSqlSmallInt; stmt): TSqlSmallInt
- Source Edit