db_t db_open_file_storage ( const db_fname_t *  file_name,
const db_file_storage_config_t config 
)

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


Copyright © 2005-2008 ITTIA®. All rights reserved.