1# relational_store_error_code.h 2 3## Overview 4 5Declares the error codes used for relational database (RDB) stores. 6 7**File to include**: <database/rdb/relational_store_error_code.h> 8 9**Library**: libnative_rdb_ndk.z.so 10 11**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core 12 13**Since**: 10 14 15**Related module**: [RDB](capi-rdb.md) 16 17## Summary 18 19### Enums 20 21| Name | typedef Keyword | Description | 22| --------------------------------- | -------------- | ---------------- | 23| [OH_Rdb_ErrCode](#oh_rdb_errcode) | OH_Rdb_ErrCode | Enumerates the RDB store error codes.| 24 25## Enum Description 26 27### OH_Rdb_ErrCode 28 29``` 30enum OH_Rdb_ErrCode 31``` 32 33**Description** 34 35Enumerates the RDB store error codes. 36 37**Since**: 10 38 39| Enum Item | Description | 40| ------------------------------------------------------------ | ----------------------------------------------------------- | 41| RDB_ERR = -1 | Execution failed. | 42| RDB_OK = 0 | Execution successful. | 43| E_BASE = 14800000 | Base of the error code. | 44| RDB_E_NOT_SUPPORTED = 801 | The RDB store does not have this capability. | 45| RDB_E_ERROR = E_BASE | Common exception. | 46| RDB_E_INVALID_ARGS = (E_BASE + 1) | Invalid parameter. | 47| RDB_E_CANNOT_UPDATE_READONLY = (E_BASE + 2) | Failed to update data because the RDB store is read-only. | 48| RDB_E_REMOVE_FILE = (E_BASE + 3) | Failed to delete the file. | 49| RDB_E_EMPTY_TABLE_NAME = (E_BASE + 5) | The table name is empty. | 50| RDB_E_EMPTY_VALUES_BUCKET = (E_BASE + 6) | The content of the KV pair is empty. | 51| RDB_E_EXECUTE_IN_STEP_QUERY = (E_BASE + 7) | The SQL statement executed during the query is incorrect. | 52| RDB_E_INVALID_COLUMN_INDEX = (E_BASE + 8) | The column index is invalid. | 53| RDB_E_INVALID_COLUMN_TYPE = (E_BASE + 9) | The column type is invalid. | 54| RDB_E_EMPTY_FILE_NAME = (E_BASE + 10) | The file name is empty. | 55| RDB_E_INVALID_FILE_PATH = (E_BASE + 11) | The file path is invalid. | 56| RDB_E_TRANSACTION_IN_EXECUTE = (E_BASE + 12) | Failed to start the transaction. | 57| RDB_E_INVALID_STATEMENT = (E_BASE + 13) | Failed to precompile the SQL statements. | 58| RDB_E_EXECUTE_WRITE_IN_READ_CONNECTION = (E_BASE + 14) | Failed to perform a write operation in a read connection. | 59| RDB_E_BEGIN_TRANSACTION_IN_READ_CONNECTION = (E_BASE + 15) | Failed to start the transaction in a read connection. | 60| RDB_E_NO_TRANSACTION_IN_SESSION = (E_BASE + 16) | The transaction to start does not exist in the database session. | 61| RDB_E_MORE_STEP_QUERY_IN_ONE_SESSION = (E_BASE + 17) | Multiple queries are executed in a database session. | 62| RDB_E_NO_ROW_IN_QUERY = (E_BASE + 18) | The result set does not contain any record. | 63| RDB_E_INVALID_BIND_ARGS_COUNT = (E_BASE + 19) | The number of parameters bound in the SQL statement is invalid. | 64| RDB_E_INVALID_OBJECT_TYPE = (E_BASE + 20) | The object type is invalid. | 65| RDB_E_INVALID_CONFLICT_FLAG = (E_BASE + 21) | The conflict resolution type is invalid. | 66| RDB_E_HAVING_CLAUSE_NOT_IN_GROUP_BY = (E_BASE + 22) | The **HAVING** keyword can be used only after **GROUP BY**. | 67| RDB_E_NOT_SUPPORTED_BY_STEP_RESULT_SET = (E_BASE + 23) | The result set by step is not supported. | 68| RDB_E_STEP_RESULT_SET_CROSS_THREADS = (E_BASE + 24) | Failed to obtain the result set. | 69| RDB_E_STEP_RESULT_QUERY_NOT_EXECUTED = (E_BASE + 25) | The result set query statement is not executed. | 70| RDB_E_STEP_RESULT_IS_AFTER_LAST = (E_BASE + 26) | The pointer of the result set is already in the last row. | 71| RDB_E_STEP_RESULT_QUERY_EXCEEDED = (E_BASE + 27) | The number of result set query times exceeds the limit. | 72| RDB_E_STATEMENT_NOT_PREPARED = (E_BASE + 28) | The SQL statement is not precompiled. | 73| RDB_E_EXECUTE_RESULT_INCORRECT = (E_BASE + 29) | The database execution result is incorrect. | 74| RDB_E_STEP_RESULT_CLOSED = (E_BASE + 30) | The result set has been closed. | 75| RDB_E_RELATIVE_PATH = (E_BASE + 31) | The file path is a relative path. | 76| RDB_E_EMPTY_NEW_ENCRYPT_KEY = (E_BASE + 32) | The new encrypt key is empty. | 77| RDB_E_CHANGE_UNENCRYPTED_TO_ENCRYPTED = (E_BASE + 33) | The RDB store is non-encrypted and cannot be changed. | 78| RDB_E_CHANGE_ENCRYPT_KEY_IN_BUSY = (E_BASE + 34) | The database does not respond when the database key is updated. | 79| RDB_E_STEP_STATEMENT_NOT_INIT = (E_BASE + 35) | The precompiled SQL statement is not initialized. | 80| RDB_E_NOT_SUPPORTED_ATTACH_IN_WAL_MODE = (E_BASE + 36) | The WAL mode does not support the ATTACH operation. | 81| RDB_E_CREATE_FOLDER_FAIL = (E_BASE + 37) | Failed to create the folder. | 82| RDB_E_SQLITE_SQL_BUILDER_NORMALIZE_FAIL = (E_BASE + 38) | Failed to build the SQL statement. | 83| RDB_E_STORE_SESSION_NOT_GIVE_CONNECTION_TEMPORARILY = (E_BASE + 39) | The database session does not provide a connection. | 84| RDB_E_STORE_SESSION_NO_CURRENT_TRANSACTION = (E_BASE + 40) | The transaction does not exist in the database session. | 85| RDB_E_NOT_SUPPORT = (E_BASE + 41) | The current operation is not supported. | 86| RDB_E_INVALID_PARCEL = (E_BASE + 42) | The current PARCEL is invalid. | 87| RDB_E_QUERY_IN_EXECUTE = (E_BASE + 43) | Failed to execute query. | 88| RDB_E_SET_PERSIST_WAL = (E_BASE + 44) | Failed to set the persistence of the database file in WAL mode. | 89| RDB_E_DB_NOT_EXIST = (E_BASE + 45) | The database does not exist. | 90| RDB_E_ARGS_READ_CON_OVERLOAD = (E_BASE + 46) | The number of read connections to set is greater than the limit. | 91| RDB_E_WAL_SIZE_OVER_LIMIT = (E_BASE + 47) | The WAL log file size exceeds the default value. | 92| RDB_E_CON_OVER_LIMIT = (E_BASE + 48) | The number of database connections has reached the limit. | 93| RDB_E_ALREADY_CLOSED = (E_BASE + 50) | The RDB store is already closed.<br>**Since**: 18 | 94| RDB_E_DATABASE_BUSY = (E_BASE + 51) | The database does not respond.<br>**Since**: 18 | 95| RDB_E_SQLITE_CORRUPT = (E_BASE + 52) | The database is corrupted.<br>**Since**: 18 | 96| RDB_E_SQLITE_PERM = (E_BASE + 53) | SQLite: access denied.<br>**Since**: 18 | 97| RDB_E_SQLITE_BUSY = (E_BASE + 54) | SQLite: database file locked.<br>**Since**: 18 | 98| RDB_E_SQLITE_LOCKED = (E_BASE + 55) | SQLite: database table locked.<br>**Since**: 18 | 99| RDB_E_SQLITE_NOMEM = (E_BASE + 56) | SQLite: insufficient database memory.<br>**Since**: 18 | 100| RDB_E_SQLITE_READONLY = (E_BASE + 57) | SQLite: attempt to write a read-only database.<br>**Since**: 18 | 101| RDB_E_SQLITE_IOERR = (E_BASE + 58) | SQLite: disk I/O error.<br>**Since**: 18 | 102| RDB_E_SQLITE_FULL = (E_BASE + 59) | SQLite: database is full.<br>**Since**: 18 | 103| RDB_E_SQLITE_CANT_OPEN = (E_BASE + 60) | SQLite: unable to open the database file.<br>**Since**: 18 | 104| RDB_E_SQLITE_TOO_BIG = (E_BASE + 61) | SQLite: TEXT or BLOB exceeds the limit.<br>**Since**: 18| 105| RDB_E_SQLITE_MISMATCH = (E_BASE + 62) | SQLite: data types mismatch.<br>**Since**: 18 | 106| RDB_E_DATA_TYPE_NULL = (E_BASE + 63) | The data to be stored is empty.<br>**Since**: 18 | 107| RDB_E_TYPE_MISMATCH = (E_BASE + 64) | The data type is incorrect.<br>**Since**: 18 | 108| RDB_E_SQLITE_CONSTRAINT = (E_BASE + 65) | SQLite error code: SQLite constraint.<br>**Since**: 18 | 109