dbc_AfterCopyProc Event

Occurs after the COPY PROCEDURE command has completed. There are two versions of the syntax.

PROCEDURE dbc_AfterCopyProc(cFileName, nCodePage, lAdditive) 

PROCEDURE dbc_AfterCopyProc
LPARAMETERS cFileName, nCodePage, lAdditive

Parameters

  • cFileName
    Specifies the name of the text file to which the stored procedures were copied.

  • nCodePage,
    Specifies the code page of the program file to which the stored procedures are copied. Visual FoxPro copies the contents of the stored procedures in the database and, as it does so, automatically converts those contents to the code page you specify.

  • lAdditive
    Specifies whether the ADDITIVE keyword was included in the COPY PROCEDURE command that triggered this event. If ADDITIVE was omitted, the stored procedures replaced the contents of the program file.

Remarks

You can use the dbc_AfterCopyProc event to track access to the database after a copy procedure completes.

Example

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

See Also

Tasks

How to: Enable or Disable DBC Events

Reference

dbc_BeforeCopyProc Event

Other Resources

Events (Visual FoxPro)