Skip to content

Error codes

parfeon edited this page Feb 7, 2012 · 2 revisions
#__Error codes__ In this document I'll enumerate possible error codes.

enum {
    SQLITE_ERROR = 1,
    SQLITE_INTERNAL = 2,
    SQLITE_PERM = 3,
    SQLITE_ABORT = 4,
    SQLITE_BUSY = 5,
    SQLITE_LOCKED = 6,
    SQLITE_NOMEM = 7,
    SQLITE_READONLY = 8,
    SQLITE_INTERRUPT = 9,
    SQLITE_IOERR = 10,
    SQLITE_CORRUPT = 11,
    SQLITE_NOTFOUND = 12,
    SQLITE_FULL = 13,
    SQLITE_CANTOPEN = 14,
    SQLITE_PROTOCOL = 15,
    SQLITE_EMPTY = 16,
    SQLITE_SCHEMA = 17,
    SQLITE_TOOBIG = 18,
    SQLITE_CONSTRAINT = 19,
    SQLITE_MISMATCH = 20,
    SQLITE_MISUSE = 21,
    SQLITE_NOLFS = 22,
    SQLITE_AUTH = 23,
    SQLITE_FORMAT = 24,
    SQLITE_RANGE = 25,
    SQLITE_NOTADB = 26,
    SQLITE_OOM = 2000,
    SQLITE_SYNTAX_ERROR = 2001,
    SQLITE_INCOMPLETE_REQUEST = 2002,
    SQLITE_GENERAL_PROCESSING_ERROR = 2003,
    DBC_TARGET_FILE_MISSED = 3000,
    DBC_WRONG_BINDING_PARMETERS_COUNT = 3001,
    DBC_CANT_CREATE_FOLDER_FOR_MUTABLE_DATABASE = 3002,
    DBC_CANT_COPY_DATABASE_FILE_TO_NEW_LOCATION = 3003,
    DBC_CANT_REMOVE_CREATED_CORRUPTED_DATABASE_FILE = 3004,
    DBC_DATABASE_PATH_NOT_SPECIFIED = 3005,
    DBC_SPECIFIED_FILE_NOT_FOUND = 3006,
};

Constants
SQLITE_ERROR
    This error, returned by database, means some general error or database missing.
SQLITE_INTERNAL
    This error means internal logic error in SQLite.
SQLITE_PERM
    This error means, that there is no access permission.
SQLITE_ABORT
    This error means, that some callback routine aborted request.
SQLITE_BUSY
    This error means, that database file is locked by another process or client.
SQLITE_LOCKED
    This error means, that the table in database is locked.
SQLITE_NOMEM
    This error means, that there is no memory for malloc().
SQLITE_READONLY
    This error means, that the client tried to write into a readonly database.
SQLITE_INTERRUPT
    This error means, that operation was terminated by sqlite3_interrupt().
SQLITE_IOERR
    This error means, that some kind of disk I/O error occurred.
SQLITE_CORRUPT
    This error means, that database's disk image is malformed.
SQLITE_NOTFOUND
    This error means, that the table or record was not found.
SQLITE_FULL
    This error means, that data insertion failed because the database is full.
SQLITE_CANTOPEN
    This error means, that the file of the database can't be opened.
SQLITE_PROTOCOL
    This error means, that database lock protocol error has occurred.
SQLITE_EMPTY
    This error means, that the database is empty.
SQLITE_SCHEMA
    This error means, that the scheme of the database was changed.
SQLITE_TOOBIG
    This error means, that string or BLOB exceeds size limits.
SQLITE_CONSTRAINT
    This error means, that the operation was aborted due to constraint violation.
SQLITE_MISMATCH
    This error means, that data mismatch was found in request.
SQLITE_MISUSE
    This error means, that the library was used incorrectly.
SQLITE_NOLFS
    This error means, that OS features, not supported by host were used .
SQLITE_AUTH
    This error means, that authorization was denied.
SQLITE_FORMAT
    This error means, that auxiliary database format error was found.
SQLITE_RANGE
    This error means, that the second parameter passed into sqlite3_bind_* is out of range.
SQLITE_NOTADB
    This error means, that the opened file is not database file.
SQLITE_OOM
    This error means, out-of-memory.
SQLITE_SYNTAX_ERROR
    This error means, that SQL syntax's error was found.
SQLITE_INCOMPLETE_REQUEST
    This error means, that SQL query is not completed.
SQLITE_GENERAL_PROCESSING_ERROR
    This error means, that some general error occurred during SQL processing.
DBC_TARGET_FILE_MISSED
    This error means, that the provided file can't be found on specified file path.
DBC_WRONG_BINDING_PARMETERS_COUNT
    This error means, that wrong number of parameters was passed for binding to SQL statement.
DBC_CANT_CREATE_FOLDER_FOR_MUTABLE_DATABASE
    This error means, that an error occurred, when trying to create folder at specified path when making mutable copy of database file.
DBC_CANT_COPY_DATABASE_FILE_TO_NEW_LOCATION
    This error means, that an error occurred when trying to copy database file to a new location where it can be mutated.
DBC_CANT_REMOVE_CREATED_CORRUPTED_DATABASE_FILE
    Tell to use UTF-16 encoding for strings.
DBC_DATABASE_PATH_NOT_SPECIFIED
    This error means, that database file's path is not specified.
DBC_SPECIFIED_FILE_NOT_FOUND
    This error means, that specified file is not found at its path.

Clone this wiki locally