Database :: operator= - Create database handle copy
The function creates a copy of a database handle. The operator may be called in C++ environment instead of calling assign().
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
This function creates a copy of the database handle passed in cDatabase. Both, the copy and the origin are referring to the same access object. The access object will be closed when closing the last database handle referring to it, regardless on the sequence the handles have been opened.
Handle copies for the same database access object must not be used in different threads. In order to provide thread-save database access, object space access copies should be used.
If cDatabase is not opened, the calling database handle will be closed.
- cDatabase
- Database handle
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.