Open an existing database storage file.
- Parameters:
-
| file_name | Name of the existing database file. |
| config | Storage access configuration. |
- Returns:
- A handle to the opened database.
- NULL on failure.
On failure, one of the following error codes is set:
- DB_EINVAL Could be caused by: file name is null or invalid storage mode.
- DB_ESTORAGE Storage data is invalid. Invalid page size could be the source of this error.
- DB_ENOENT The file does not exist.
- DB_EACCESS The file cannot be read, or is read-only.
- DB_EOSERROR The file is otherwise unreadable.
- DB_ESOCKETCONNECTION A connection to the server cannot be established (IPC client only.)
- DB_ESOCKETHOSTNAME The given host name cannot be resolved (IPC client only.)
- See also:
- db_create_file_storage, db_shutdown