company logo

Database :: storeOption - Store option in database configuration

An option with the name (path) passed in sOption may be saved in a configuration, which is stored in the database. Usually, the configuration name is identical with the user or login name set in the configuration file or obtained from the system. Options from the configuration are usually initialized when opening a database.

When no configuration can be located, the default configuration is used instead. Since the default configuration is shared by different users, trying to update the default configuration will return an error ( bState false ). In order to change the default configuration explicitly, bDefault has to be set to true .

When the option value sOption does not yet exist in the selected configuration, it will be created before being set.

Return value:  Success ( bool  )

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

Implementation details

  1. Store option value to configuration
    bool Database  :: storeOption ( odaba::String &sConfiguration, odaba::String &sOption, odaba::String &sValue, bool bDefault )

    The function stores the value passed in sValue to the option sOption of the configuration passed in sConfiguration . The function does not change current settings for the internal option value. When no such configuration exists, the function returns an error ( bState is true ). When bDefault is set to true, the function tries to locate the default configuration, when the configuration requested does not exist.

    • sConfiguration - - internal feature (not documented)
    • sOption - Option name

      Option names are names for variables (options) defined in the configuration or ini-file, in the system environment or set by the program. Option names can be provides as option paths in order to refer to an option value in the option hierarchy.

        option("DICTIONARY");

        option("ode.DICTIONARY");

    • sValue - String value
    • bDefault - Use/update default configuration
  2. to list
  3. Save value currently set
    bool Database  :: storeOption ( odaba::String &sOption, bool bDefault )

    The function saves the value currently set for the option to the configuration located as user configuration in the database.

    • sOption - Option name

      Option names are names for variables (options) defined in the configuration or ini-file, in the system environment or set by the program. Option names can be provides as option paths in order to refer to an option value in the option hierarchy.

        option("DICTIONARY");

        option("ode.DICTIONARY");

    • bDefault - Use/update default configuration
  4. to list
  5. Store passed option value
    bool Database  :: storeOption ( odaba::String &sOption, odaba::String &sValue, bool bDefault )

    The function stores the value passed to the option to the configuration located as user configuration. The function does not change current settings for the internal option value.

    • sOption - Option name

      Option names are names for variables (options) defined in the configuration or ini-file, in the system environment or set by the program. Option names can be provides as option paths in order to refer to an option value in the option hierarchy.

        option("DICTIONARY");

        option("ode.DICTIONARY");

    • sValue - String value
    • bDefault - Use/update default configuration
  6. to list