Occurs when a database is opened explicitly by the OPEN DATABASE command or implicitly by another command such as MODIFY DATABASE or USE <Table> with a table contained in a closed database. There are two versions of the syntax.
PROCEDURE dbc_OpenData (cDatabaseName, lExclusive, lNoUpdate, lValidate ) |
PROCEDURE dbc_OpenData LPARAMETERS [cDatabaseName, lExclusive, lNoUpdate, lValidate ] |
Parameters
- cDatabaseName
- Specifies the name of the database being opened.
- lExclusive
- Specifies whether the database is being opened in exclusive mode.
- lNoUpdate
- Specifies whether the NOUPDATE keyword was included in the OPEN DATABASE command, which means the database is being opened in read only mode.
- lValidate
- Specifies whether the VALIDATE keyword was included in the OPEN DATABASE command, which causes the database to be validated as it is opened.
Remarks
You can use the dbc_OpenData event to track attempted access to the database as the database opens.
By returning false, this method prevents the database from being opened.
Example
В | Copy Code |
---|---|
PROCEDURE dbc_OpenData ; (cDatabaseName, ; lExclusive, ; lNoUpdate, ; lValidate) ? ' cDatabaseName = ' + TRANSFORM(cDatabaseName) + ' - ' ; + TYPE('cDatabaseName') ? ' lExclusive = ' + TRANSFORM(lExclusive) + ' - ' ; + TYPE('lExclusive') ? ' lNoUpdate = ' + TRANSFORM(lNoUpdate) + ' - ' ; + TYPE('lNoUpdate') ? ' lValidate = ' + TRANSFORM(lValidate) + ' - ' ; + TYPE('lValidate' ENDPROC |