DBBaseContext :: doBeforeOpen - Before open handler
The before open handler is called when opening the context ( DBP_Open event). The before open handler can deny opening the context by returning an error ( any value >0 ). In this case the context has the process state PRC_NotOpened .
When the event is generated, the database is already opened and may be accessed (e.g. for checking login information).
The handler can be overloaded in specialized property and type context class implementations. When terminating the handler with an error, the database will be closed and opening will be denied.
Return value: Execution error ( int32 )
The value is usually returned from context functions or actions in order to report the result of execution. The variable may contain following values:
- -1: function/action not executed
- 0: function executed normally
- 1-9: Function executed with errors. Error codes depend on the function/action called.