company logo

Client - ODABA client

In order to run client server or local applications at least one client instance is required. In order to support several connections to different servers, each server connection requires a separate client handle. Several clients can be created from within an application. The first client created is considered to be the main client .

Usually, the main client is sufficient and most client constructors or open functions refer to the main client by not passing any parameter. Since it is not transparent to the developer, when a main client has been created, the first client creates in an application client, which passes a configuration file in order to (re)initialize the main client.

In addition, any number of clients can be created in order to connect to different servers from one application. In order to create a new application client, which is usually not the main client, the constructor or open by application type can be called ( open( eApplicationType ) ).

Clients are created implicitly, when creating or opening a data source. When working without referring to a data source, clients need to be opened explicitly. Usually, working without data source is suggested, when database path are fixed and can be defined in the application directly. In order to refer to variable database paths, a data source ( DataSource ) should be used instead.

  mainClient().initialize("config.ini","MyApplication",ConsoleApplication);

  Dictionary dict(mainClient,"c:/myProj/proj.dev");

  Database   db(dict,"c:/myProj/proj.dat",Write);

Attributes
    Function Groups
    Functions