company logo

Using Database Handle

In order to open a database, a dictionary has to be opened before. Alternatively, one may open the database referring to a defined data source.

The database is opened as local database or as server database depending on the opening mode of the dictionary. One may also run a local data base with a server dictionary, but not reverse. When a database not yet exists, it will be created on the fly when opening the database. Databases created implicitly, automatically enable the auto-expand facility. In order to disable this feature, the database has to be created calling the newdb implementation for open().

In most cases, the default open() implementation is sufficient for opening a database. In order to open database with different client/server mode than the dictionary, for an older version etc. the database open() function should be used.

... fragment ( ) {

  Dictionary dict;

  Database   db;

  dict.open("Sample.dev", Read, true);

  db.open(dict, "Sample.dat");

  // ... do something

}

Related topics