company logo

ApplicationContext :: openDatabase - Open or change application database

The function opens or changes the application database. When the path passed to the function does not refer to a valid location, the function throws an error. When the database does not yet exist, the function creates the database, when being opened with write access or throws an exception otherwise.

When implementing applications that allow changing the database, context class functions have to be aware, the property handles opened by the context class may be closed after changing the database. In order to reopen such property handle, the doAfterHandleOpen() handler may be implemented in appropriate context classes.

Similar problems may happen when referring to OSI functions explicitly. Since all OSI functions are removed when changing the database, they are not accessible after changing the database.

Return value:  Return code for executing an action (function) ( int32  )

A return code -1 indicates, that the action was not executed and should be toggled to the next executing object.

A return code 0 indicates, that the function was terminated successfully.

All other return codes indicate an error.

Implementation details