Share via


dbc_PackData Event

Occurs before the PACK DATABASE command runs.

PROCEDURE dbc_PackData( ) 

Remarks

You can use the dbc_PackData event to track access to the database before a PACK DATABASE runs.

Return .F. from this procedure to prevent the database from being packed. You will get a "File access denied" error when attempting to pack the database when returning .F..

Example

* Reports to the screen Event name, where it is called from and ;
* the parameter passed.
PROCEDURE dbc_PackData
 ? '  -  ' + PROGRAM()
 ??' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
 ? '     Current DBC: ' + SUBSTR(DBC(),RAT('\',DBC())+1)+' /end/ '
ENDPROC

See Also

Enable or Disable DBC Events | PACK DATABASE Command