company logo

Database :: storeOptions - Store options in database configuration

The function stores all options set internally to the configuration passed in sConfiguration. When passing an empty value in sConfiguration, the function tries to locate the configuration for the current user, which is the configuration with the user name obtained from the system or from the configuration file. When no configuration could be located, the function tries to locate the default configuration. In order to update the default configuration, bDefault has to be set to true.

The function reads all (hierarchical) options from the configuration and replaces the values by the values currently set in the application.

When no configuration could be located, the function returns an error (bState is false).

Notes:

Since options not explicitly set will always return an empty value, several options might be reset to empty when not being initialized properly. In order to initialize option values set in a configutation, initializeOptions() should be called after opening the database.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Database  :: storeOptions ( odaba::String &sConfiguration, bool bDefault )
  • sConfiguration - Configuration name

    Database or XML configurations support multiple configurations. In order to initialize options from a special configuration, the configuration name is required.

  • bDefault - Use/update default configuration