Relational Database Error Codes
Note:
Currently in the beta phase.
Note:
This document only introduces error codes specific to this module. For general error codes, please refer to the Universal Error Code Documentation.
14800000 Internal Error
Error Message
Inner error.
Error Description
Internal error.
Possible Causes
Check the error log first for detailed error information. Main causes include:
- SQL execution exception.
- Internal state exception.
- Incorrect interface usage.
- System errors such as null pointer, insufficient memory, abnormal restart of data service, I/O error, IPC exception, JS engine exception, etc.
Resolution Steps
- Developers should check if SQL statements and predicates are used correctly.
- Developers should check if objects are being used after being closed.
- Developers should verify if interfaces are used correctly as per the documentation.
- Try retrying. If the issue persists, prompt the user to restart the application, upgrade the application, or update the device version.
14800010 Invalid Database Path
Error Message
Invalid database path.
Error Description
Invalid database path.
Possible Causes
Invalid database path.
Resolution Steps
Check the provided database path.
14800011 Database File Corrupted
Error Message
Database corrupted.
Error Description
This error code indicates that the database is corrupted when calling interfaces for operations such as insertion, deletion, query, or data synchronization.
Possible Causes
The database file is corrupted during operations like insertion, deletion, query, or data synchronization.
Resolution Steps
- If a backup exists, attempt to restore the database using the backup file.
- If no backup exists, try deleting and recreating the database.
14800012 Result Set Empty or Invalid Position
Error Message
Row out of bounds.
Error Description
Result set is empty or the specified position is invalid.
Possible Causes
The result set is empty or the specified row number is out of the valid range [0, m - 1], where m = resultsetV9.rowCount.
Resolution Steps
Check if the current result set is empty or if the specified position is valid.
14800013 Column Value Null or Incompatible Column Type
Error Message
Column out of bounds.
Error Description
Column value is null or the column type is incompatible with the current interface call.
Possible Causes
- Result set is empty.
- Current row number is out of range [0, m - 1], where m = resultsetV9.rowCount.
- Current column number is out of range [0, n - 1], where n = resultsetV9.columnCount.
- Current column data type is not supported by the interface.
Resolution Steps
- Check if the result set is empty.
- Verify if the current row and column numbers are within valid ranges.
- Ensure the current column data type is supported.
14800014 Database or Result Set Closed
Error Message
Already closed.
Error Description
Database or result set is closed.
Possible Causes
Objects with close interfaces (e.g., RdbStore or ResultSet) have either been closed or failed to open successfully.
Resolution Steps
Reopen the RdbStore or requery to obtain a new ResultSet.
14800015 Database Unresponsive
Error Message
The database does not respond.
Error Description
Database is unresponsive.
Possible Causes
Read, write, attach, or detach operations are in progress, preventing the current operation from executing within the specified time (default: 2s).
Resolution Steps
Retry the operation.
14800016 Database Alias Already in Use
Error Message
The database is already attached.
Error Description
The alias of the attached database is already in use.
Possible Causes
The alias of the attached database is already in use.
Resolution Steps
Either skip attaching the database or modify the alias of the attached database.
14800017 Critical Configuration Changed
Error Message
Config changed.
Error Description
Critical database configuration has been modified.
Possible Causes
Changes to critical configurations such as area, isEncrypt, or securityLevel.
Resolution Steps
Either revert to the original configuration or export data using the original configuration, delete the old database, create a new one with the new configuration, and import the data.
14800018 No Data Matches the Condition
Error Message
No data meets the condition.
Error Description
SQL statement is incorrect, and no data matching the condition was found.
Possible Causes
The SQL statement does not correctly query the result set.
Resolution Steps
Write a correct query statement or add data to the database before querying.
14800019 SQL Must Be a Query Statement
Error Message
The SQL must be a query statement.
Error Description
SQL must be a query statement.
Possible Causes
SQL statement does not comply with specifications, causing query failure.
Resolution Steps
Write an SQL statement that complies with the specifications.
14800021 SQLite: Generic Error
Error Message
SQLite: Generic error.
Error Description
SQLite: Generic error.
Possible Causes
Errors during SQL execution, such as:
- Inserting or updating a non-existent table.
- Inserting or updating a non-existent column.
- Calling undefined functions. Refer to SQLITE_ERROR scenarios.
Resolution Steps
Analyze the SQL statement to identify the error.
14800022 SQLite: Callback Request Aborted
Error Message
SQLite: Callback routine requested an abort.
Error Description
SQLite: Callback request aborted.
Possible Causes
- Typically occurs when using SQLite's custom function mechanism, where the callback is aborted.
- Refer to SQLITE_ABORT scenarios.
Resolution Steps
Check the implementation of SQLite hook functions (callbacks) to ensure correctness.
14800023 SQLite: Access Permission Denied
Error Message
SQLite: Access permission denied.
Error Description
SQLite access permission denied.
Possible Causes
- OS-level permission issues, where SQLite lacks sufficient permissions to access or modify a file.
- Refer to SQLITE_PERM scenarios.
Resolution Steps
- Ensure the file is not read-only; if so, remove the read-only attribute.
- Verify file and folder permissions to ensure the current user has sufficient read/write permissions.
- Check if the file system is read-only; if so, switch to writable mode.
- Ensure no other processes are locking the database file; if so, terminate those processes.
- Ensure sufficient permissions to modify file or folder permissions.
14800024 SQLite: Database File Locked
Error Message
SQLite: The database file is locked.
Error Description
SQLite database file is locked.
Possible Causes
- Concurrent database operations by multiple processes (e.g., UIability and datashareability) or processes within the same group.
- Refer to SQLITE_BUSY scenarios.
Resolution Steps
- Avoid concurrent database operations by processes.
- Retry after waiting.
14800025 SQLite: Table Locked
Error Message
SQLite: A table in the database is locked.
Error Description
SQLite: A table in the database is locked.
Possible Causes
- Attempting to write to a SQLite database while the file is locked by another process, possibly due to an ongoing transaction or other locking mechanisms.
- Refer to SQLITE_LOCKED scenarios.
Resolution Steps
- Ensure no other processes or threads are writing to the database file.
- If using transactions, avoid write operations before committing.
- Check for other locking mechanisms (e.g., file locks) blocking writes.
- Ensure database connections are properly closed after operations.
- In multi-threaded environments, use locks to prevent race conditions.
14800026 SQLite: Out of Memory
Error Message
SQLite: The database is out of memory.
Error Description
SQLite: Database out of memory.
Possible Causes
Insufficient memory due to large data volume or inadequate memory allocation.
Resolution Steps
Reduce data volume or increase memory allocation.
14800027 SQLite: Attempt to Write Readonly Database
Error Message
SQLite: Attempt to write a readonly database.
Error Description
SQLite: Attempt to write a readonly database.
Possible Causes
- Attempting to write to a SQLite database opened in read-only mode, possibly due to file permissions, read-only file system, or database marked as read-only.
- Refer to SQLITE_READONLY scenarios.
Resolution Steps
- Ensure sufficient permissions to write to the database file.
- If the file system is read-only, switch to writable mode.
- Verify that the database was not opened with read-only parameters.
14800028 SQLite: Disk I/O Error
Error Message
SQLite: Some kind of disk I/O error occurred.
Error Description
SQLite: A disk I/O error occurred.
Possible Causes
Possible reasons include:
- File does not exist.
- File is read-only.
- Insufficient disk space.
- File corruption.
- Refer to SQLITE_IOERR scenarios.
Resolution Steps
- Verify the file path and existence.
- Ensure the file is not read-only.
- Check disk space and free up space if necessary.
- Verify file permissions to ensure the application has sufficient read/write access.
14800029 SQLite: Database Full
Error Message
SQLite: The database is full.
Error Description
SQLite database is full.
Possible Causes
Database is full due to excessive data volume or insufficient disk space.
Resolution Steps
Reduce data volume or increase disk space.## 14800030 SQLite: Unable to Open Database File
Error Message
SQLite: Unable to open the database file.
Error Description
SQLite: Unable to open the database file.
Possible Causes
- The file does not exist, and creating a new database failed.
- The file exists, but the database file is corrupted.
- File permission issues prevent SQLite from reading or writing the file.
- Insufficient disk space.
- Refer to error scenarios related to SQLITE_CANTOPEN.
Resolution Steps
- Verify the database file path is correct, check file permissions, and ensure the application has sufficient permissions to read/write the file.
- Confirm there is adequate disk space.
14800031 SQLite: TEXT or BLOB Exceeds Size Limit
Error Message
SQLite: TEXT or BLOB exceeds size limit.
Error Description
SQLite: TEXT or BLOB exceeds size limit.
Possible Causes
- The query result set exceeds the size limit that SQLite can handle.
- Refer to error scenarios related to SQLITE_TOOBIG.
Resolution Steps
Break down large queries into smaller ones, processing data in batches.
14800032 SQLite: Abort Due to Constraint Violation
Error Message
SQLite: Abort due to constraint violation.
Error Description
SQLite: Abort due to constraint violation.
Possible Causes
- Attempting to write to the SQLite database violated its integrity constraints.
- Refer to error scenarios related to SQLITE_CONSTRAINT.
Resolution Steps
Check if the data being inserted or updated violates the specified constraints.
14800033 SQLite: Data Type Mismatch
Error Message
SQLite: Data type mismatch.
Error Description
SQLite: Data type mismatch.
Possible Causes
- The data types involved in an SQL statement do not match those stored in the database.
- Refer to error scenarios related to SQLITE_MISMATCH.
Resolution Steps
Verify the data types of columns in the SQL statement and ensure the inserted, updated, or queried data types match the column data types.
14800034 SQLite: Library Used Incorrectly
Error Message
SQLite: Library used incorrectly.
Error Description
SQLite: Library used incorrectly.
Possible Causes
- Indicates incorrect database operations or usage context. This error typically occurs in the following scenarios:
- Performing another operation before the current database operation completes.
- Continuing operations on a database connection after it has been closed.
- Using database objects that have been released or are invalid.
- Refer to error scenarios related to SQLITE_MISUSE.
Resolution Steps
- Ensure proper synchronization between database operations, such as using locks or other synchronization mechanisms.
- Ensure the database connection is open before use and closed after operations are completed.
- Ensure all database objects are properly released after use.
14800047 WAL File Size Exceeds Default Limit
Error Message
The WAL file size exceeds the default limit.
Error Description
The WAL file size exceeds the default limit (200M).
Possible Causes
Continuous insert, update, or delete operations while read transactions are open or result sets are not closed, causing the WAL file size to exceed the default limit.
Resolution Steps
Check if result sets or transactions are left unclosed.
Close all result sets or transactions.
14800050 Failed to Obtain Subscription Service
Error Message
Failed to obtain subscription service.
Error Description
Failed to obtain subscription service.
Possible Causes
The current platform does not support subscription services.
Resolution Steps
Deploy subscription services on the current platform.
14801001 Context Environment Not in Stage Model
Error Message
Only supported in stage mode.
Error Description
This operation is only supported in Stage model.
Possible Causes
The current context environment is not in Stage model.
Resolution Steps
Switch the current context environment to use Stage model.
14801002 Invalid dataGroupId Parameter in storeConfig
Error Message
The data group id is not valid.
Error Description
Invalid dataGroupId parameter used.
Possible Causes
The dataGroupId used was not properly obtained from the application market.
Resolution Steps
Apply for a dataGroupId from the application market and pass it correctly.
14800051 Distributed Table Type Mismatch
Error Message
The type of the distributed table does not match.
Error Description
Inconsistent distributed table types set for the same database table.
Possible Causes
Inconsistent distributed table types set for the same database table. For distributed table types, refer to DistributedType.
Resolution Steps
Ensure consistent distributed table types for the same database table. A distributed table configured for device-device synchronization cannot be reconfigured for device-cloud synchronization.