company logo

ODABAClient :: Initialize - Initialize client

The initialize function can be used to initialize an ODABA client after construction. Initialize will setup the main client when not yet active. This includes initializing the main client including the system services from the SYSTEM section in the ini file passed to the function.

Initialize can be called any number of times, but it should be called before connecting to a database or after disconnecting and before connecting again. Initialize does not disconnect automatically.

When the ini-file changes the system section, initialize must be called for the main client as

ODABAClient()->Initialize(...)

In this case, the main client will be disconnected and reconnected to the server in order to reestablish the system connection. When using the system connection provided by the main client for data communication, all dictionaries and databases must be closed before calling initialize. Otherwise, data communication will fail after initialize.

Implementation details

ODABAClient  :: Initialize ( NPath &ini_file, NString &application_name=NString::Null(), NPath &progpath=NULL, ::ApplicationTypes application_type=APT_Console, logical init_services=YES )
  • ini_file - Application ini-file
  • application_name - Allocation name Default: NString::Null()
  • progpath - Program path

    This is the path that is usually passed as first argument to the application.

    Default: NULL
  • application_type - Application type

    This option indicates that the application will run as console or windows application.

    Default: APT_Console
  • init_services - Initialize services

    This option should be set to true (YES) in order to reinitialize system services from the settings in the passed ini-file. This becomes necessary, when settings in the SYSTEM section or in the DATA-CATALOG section have been changed and need to be activated.

    Default: YES