company logo

DataSource :: databasePath - DATABASE options

The database path refers to the location of the root base for the database. Paths can be defined as absolute or relative paths, or as reference path containing symbolic references (%sym_name%).

Usually, this value is set in the configuration or ini-file in the DATABASE option for the data source definition. In case of complex database definitions with sub-options, one may, however, also define the database path in the PATH sub-option DATABASE.PATH.

; simple definition

DATABASE=C:/ODABA/Sample/Sample.dat

; compley definition

DATABASE=C:/ODABA/Sample/Sample.dat[

TYPE=ODABA

CONNECTION=Local]

Return value:  File path to database location ( odaba::String & )

The database path refers to the location of the main database file (root base).

In order to pass no database path, an empty string ( String() ) has to be passed.

Implementation overview

Implementation details

  1. Get database path
    odaba::String DataSource  :: databasePath (  )

    The function returns the database path set for the data source. When a symbolic name has been assigned to the data source (%sym_name%), the symbolic name is returned. In order to get the resolved database path, call database().path() instead.

  2. to list
  3. Set database path
    odaba::String DataSource  :: databasePath ( odaba::String &sDatabasePath )

    The function allows setting the database path for the data source. The function does not close the database, when it is still open, i.e. database handle and database path might become inconsistent. In order to reopen the database with the new data base path, openDatabase() has to be called.

    • sDatabasePath - File path to database location

      The database path refers to the location of the main database file (root base).

      In order to pass no database path, an empty string ( String() ) has to be passed.

  4. to list