JavaScript Editor js editor     Web development 

Main Page

Occurs before the specified table is removed from the active database and deleted from disk with the DROP TABLE command. There are two versions of the syntax.

PROCEDURE dbc_BeforeDropTable(cTableName, lRecycle) 
PROCEDURE dbc_BeforeDropTable
LPARAMETERS cTableName, lRecycle



Specifies the table being removed from the current database and deleted from disk.

Specifies whether the table is to be placed in the Microsoft Windows Recycle Bin rather than immediately deleted from the disk. Some data, such as the table properties available only in tables contained in a database, are lost even if the table is only recycled rather than removed and deleted.


You can use the dbc_BeforeDropTable event to verify an appropriate value for cTableName, and use those parameters in a procedure to track, or manage access to the database before the table is removed from the database and the disk.

If you delete a table by using DELETE FILE or the operating system, no event occurs.

Return .F. from this procedure to prevent the table from being dropped.


В Copy Code
* Reports the name of the method, where it came from and what the 
* parameter values were.
PROCEDURE dbc_BeforeDropTable ;
         (cTableName, ;
 ? '>>   ' + PROGRAM()
 ?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
? '     cTableName = ' + TRANSFORM(cTableName) + ' - ' ;
                   + TYPE('cTableName ')
? '     lRecycle   = ' + TRANSFORM(lRecycle)   + ' - ' ;
                   + TYPE('lRecycle')+' /end/ '

See Also

JavaScript Editor js editor     Web development