company logo

Client :: Client - Constructor

Client objects are created in order to manage the connection to the database. Client objects provide scalability, since client objects creates may connect to local databases, but also to different types of servers.

Implementation overview

Implementation details

  1. Create copy handle for client
    Client  :: Client ( odaba::Client &cClient )

    The copy of the client handle refers to the client object that is referenced in the client handle passed in cClient. In order to open client handle for the main client, client.open(odaba::Application::mainClient()) can be called.

    • cClient - Client handle

      The client handle refers to an (usually) opened ODABA client. Calling functions with invalid client handles may cause an exception. For checking the client handle, isValid() can be called.

  2. to list
  3. Create application client
    Client  :: Client (  )

    A new client different from the main client can be created in order to establish a connection to another server. The function is usually called, only, when more than one client is required by the application.

    Empty clients are sufficient in order to open dictionary and data base for simple applications but do not provide access to system resources.

    Notes:

    This function can be called in order to get a client handle anywhere in the application, since no additional information is requested for the client.

  4. to list
  5. Create new client
    Client  :: Client ( odaba::ApplicationTypes eApplicationType )

    A new client different from the main client can be created in order to establish a connection to another server. The function is usually called, only, when more than one client is required by the application. When the client is the first client created in an application, the client is considered as main client.

    • eApplicationType - Application type

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

  6. to list