Occurs before a table is removed from the database. There are two versions of the syntax.
PROCEDURE dbc_BeforeRemoveTable(cTableName, lDelete, lRecycle) |
PROCEDURE dbc_BeforeRemoveTable LPARAMETERS cTableName, lDelete, lRecycle |
Parameters
- cTableName
- Specifies the name of the table being removed from the database.
- lDelete
- Specifies whether the table is deleted rather than converted to a free table.
- lRecycle
- Specifies whether the table is placed in the 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, is lost even if the table is only recycled rather than removed and deleted.
Remarks
You can use the dbc_BeforeRemoveTable event to track, or manage access to the database before a table is removed from the database and from the disk.
Return .F. from this procedure to prevent the table from being removed.
Example
В | Copy Code |
---|---|
* Reports to the screen Event name, where it is called from and ; * the parameter passed. PROCEDURE dbc_BeforeRemoveTable ; (cTableName, ; lDelete, ; lRecycle) ? '>> ' + PROGRAM() ?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1) ? ' cTableName = ' + TRANSFORM(cTableName) + ' - ' ; + TYPE('cTableName ') ? ' lDelete = ' + TRANSFORM(lDelete) + ' - ' ; + TYPE('lDelete') ? ' lRecycle = ' + TRANSFORM(lRecycle) + ' - ' ; + TYPE('lRecycle')+' /end/ ' ENDPROC |