Share via


dbc_AfterCopyProc Event

Occurs after the COPY PROCEDURE command has completed.

PROCEDURE dbc_AfterCopyProc(cFileName, nCodePage, lAdditive) 

-or-

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

Enable or Disable DBC Events | dbc_BeforeCopyProc Event