company logo

DataSource :: openDatabase - Open database handle

The database handle for the database defined in the database path will be opened. When no object space is defined, the root object space of the database becomes the current object space for the data source. Opening the database requires an opened dictionary. When the database handle is already opened, it will be closed before opening the new database handle (closeDatabase()).

When the client is an object server client, the database will be opened as local database, when the dictionary has been opened locally. In order to open a server database, the dictionary must have been opened as server dictionary and a symbolic path name has to be set in the databasePath option (e.g. %SampleDat%).

In case of replication server, a symbolic name has to be set in databasePath. This symbolic name must be defined as file name in the file catalog of the server, but also as local option with the path for the local database replicate.

Return value:  Database handle ( odaba::Database & )

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

Implementation details

odaba::Database & DataSource  :: openDatabase (  )