ODABAClient :: Connect - Connect to server
This function establishes a connection to the server. When not connecting the client to a server the client runs in local mode. When running in local mode all resources are located on the client machine.
When being connected to a server one may access resources located on the server or on the local machine by setting the local_resources parameter when constructing dictionary or database handles.
When connecting several times for closing the connection one has to disconnect as often as one has connected to the server. When the client is connected once it cannot be connected to another server until the opened connection is closed.
When the server supports connection cache, one may pass a unique connection identification in cache_string . This will keep the connection open for the application and provides fast reconnection. Associating the connection with a unique connection identifier will prevent the connection from being reused by other applications. Unique connection identifier should be provided as GUIDs.
Implementation details
- server_name - Server name
- host_port
- Port number
The port number must be the same the server has been started with (e.g. 6123). When no port number is passed, the client expects the port number being defined in a system variable SERVER_PORT or in a system environment ini-file on the ODABA installation folder.
Default: 6123
- cache_string
- CONNECTION_NAME option
The connection name is used for reconnecting the database.
Default: NString::Null()