Application :: database - Get database handle
When running utilities, the database handle is the access handle for the database handled by the utility. When running OShell or OSI, the application database is the database for the data source currently active.
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
The function provides a database handle for the current context. When the function is called while running an OSI function or expression, the database handle from the current environment will be returned (data source). Otherwise, the utility context is checked and when running a utility, the database handle is returned from the utility data source.
When not running in a utility or OSI context, the function throws an exception.