- text, code = query:lastError()
- query:clearError()
SYNOPSIS
DESCRIPTION
When any of the other functions working on a database or query handle indicates an error condition, the error is stored inside the handle and can be retrieved by calling sql:lastError().
When the error has been handled by the application, it can be cleared by calling clearError().
RETURN VALUE
If an error has been stored, returns two values. A string describing the error and a numeric error code. Both values are retrieved from the database engine.
If no error has been stored, returns nil.