Occurs when a database closes. There are two versions of the syntax.
PROCEDURE dbc_CloseData(cDatabaseName, lAll)
PROCEDURE dbc_CloseData LPARAMETERS cDatabaseName, lAll
- Specifies the name of the target database.
- Specifies whether the ALL keyword was included in the CLOSE DATABASES command. If DBC Events is turned on, this event occurs whenever a database is closed whether or not it is closed explicitly with the CLOSE DATABASES command.
You can use the dbc_CloseData event to verify appropriate values for cDatabaseName and lAll or use those parameters in a procedure to track access to the database when the database is about to be closed
When several databases are closed at one time, the dbc_CloseData method for each database is fired in turn. Therefore, if you issue the CLOSE DATABASES ALL command, several different CloseData events occur and several different dbc_CloseData methods can be executed.
Return .F. from this procedure to prevent the database from being closed.
PROCEDURE dbc_CloseData ; (cDatabaseName,; lAll) ? ' cDatabaseName = ' + TRANSFORM(cDatabaseName) + ' - ' ; + TYPE('cDatabaseName') ? ' lAll = ' + TRANSFORM(lAll) + ' - ' ; + TYPE('lAll')+' /end/ ' RETURN .F. && This will prevent database closure. ENDPROC