dbc_BeforeRenameConnection Event

JavaScript Editor js editor     Web development 



Main Page

Occurs before a connection is renamed. There are two versions of the syntax.

PROCEDURE dbc_BeforeRenameConnection(cPreviousName,cNewName)
PROCEDURE dbc_BeforeRenameConnection
LPARAMETERS cPreviousName, cNewName

Parameters

cPreviousName


Specifies the current name of the connection.
cNewName


Specifies the new name of the connection.

Remarks

You can use the dbc_BeforeRenameConnection event to track attempted access to the database before connections are renamed.

Return .F. from this procedure to prevent the connection from being renamed.

Example

В Copy Code
* Reports to the screen Event name, where it is called from and ;
* the parameter passed.
PROCEDURE dbc_BeforeRenameConnection ;
         (cPreviousName, cNewName)
 ? '>>   ' + PROGRAM()
 ?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
 ? '     cPreviousName = ' + TRANSFORM(cPreviousName)    + ' - ' ;
                       + TYPE('cPreviousName ')
 ? '     cNewName      = ' + TRANSFORM(cNewName)         + ' - ' ;
                       + TYPE('cNewName ')+' /end/ '
ENDPROC

See Also



JavaScript Editor js editor     Web development