company logo

Local database access

Local database access is the fastest way of accessing an ODABA database. In this case, the application acts as client and as server at the same time.

Local database access is the preferred access mode for running maintenance jobs (e.g. copying or checking a database).

Local database access is indicated by defining NET=NO in the data source definition. It does not matter (except access speed) whether the database file(s) is located on a drive in the local network, in the internet or on a local computer drive.

In order to improve performance, one may enable the root base cache by defining a [CACHE] section in the ini-file or by calling Application::sharedDatabase(true) in the application program before opening may database. Within the [CACHE] sectionmay (but need not) define additional cache options. When activating the root base cache, instance descriptors (and instances) are cached. When root base cache is enabled, resource locks are managed via the root base cache (between threads) and the application can be run in multiple thread mode.

Local database access the best ways of triggering database events since there are no other processes, which may cause events.

// local database access

[CACHE]

.... cache options

[Sample]

DICTIONARY=c:/odaba/Sample/Sample.dev

DSATABASE=c:/odaba/Sample/Sample.dat

NET=NO

Notes:

Since local database access does not permorm database resource locks, processes running in local database access mode are not thread save as long as rootbase cache is not enabled.