dbc_BeforeRenameTable Event
Occurs before a table is renamed. There are two versions of the syntax.
PROCEDURE dbc_BeforeRenameTable(cPreviousName, cNewName)
PROCEDURE dbc_BeforeRenameTable
LPARAMETERS cPreviousName, cNewName
Parameters
cPreviousName
Specifies the current name of the table.cNewName
Specifies the new name of the table.
Remarks
You can use the dbc_BeforeRenameTable event to track attempted access to the database before a connection, is renamed, or to prevent renaming of a table.
Return .F. from this procedure to prevent the table from being renamed.
Example
PROCEDURE dbc_BeforeRenameTable;
(cPreviousName, ;
cNewName)
? '>> ' + PROGRAM()
?? 'in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1
? ' Current DBC: ' + SUBSTR(DBC(),RAT('\',DBC())+1
? ' cPreviousName = ' + TRANSFORM(cPreviousName) + ' – ' +
TYPE('cPreviosName ')+' /end/ '
ENDPROC
See Also
Tasks
How to: Enable or Disable DBC Events