company logo

DataSource :: resourceDatabasePath - RESOURCES options

Usually, resources are defined in the dictionary. in special cases, however, resources cannot be provided in the dictionary and a separate resource database is required. When a resource database has been defined, application resources are searched in the resource database, but not in the dictionary.

E.g. when running an application that works on the development database with the dictionary ode.sys, the resources, that one might want to test are not defined in this dictionary, but in the resource database ode.dev. Defining the database ode.dev as resource database in addition to the dictionary will solve this problem.

The dictionary for the resource database is always the system dictionary defined in the SYSTEM section of the configuration file.

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

; simple definition

RESOURCES=C:/ODABA2/ode.dev

; complex definition

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

TYPE=ODABA

CONNECTION=Local]

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

The resource 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 resource database path
    odaba::String DataSource  :: resourceDatabasePath (  )

    The function returns the resource database path set for the data source. When symbolic names have been used in the resource database path (%sym_name%), the path with unresolved names is returned. In order to get the resolved resource database path, call resourceDatabase().path(), instead.

  2. to list
  3. Change resource database path
    odaba::String DataSource  :: resourceDatabasePath ( odaba::String &sResourceDatabasePath )

    The function allows changing the resource database path for the data source. The function does not close the resource database, when it is still open, i.e. resource database handle and resource database path might become inconsistent.

    • sResourceDatabasePath - File path to resource database location

      The resource 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