Compartir a través de


dbc_BeforeAppendProc Event

Occurs before an APPEND PROCEDURES command completes. There are two versions of the syntax.

PROCEDURE dbc_BeforeAppendProc(cFileName, nCodePage, lOverwrite) 

PROCEDURE dbc_BeforeAppendProc
LPARAMETERS cFileName, nCodePage, lOverwrite

Parameters

  • cFileName
    Specifies the name of a text file from which the stored procedures are to be appended.

  • nCodePage,
    Specifies the code page of the text file from which the stored procedures are to be appended. Visual FoxPro copies the contents of the text file and, as it does so, automatically converts those contents to the code page you specify.

  • lOverwrite
    Specifies whether the OVERWRITE keyword was included in the APPEND PROCEDURE command. If OVERWRITE was omitted, the current stored procedures in the database are appended to the existing stored procedures, otherwise they replace any existing procedures.

Remarks

You can use the dbc_BeforeAppendProc to track attempted access to the database before stored procedures are appended.

Return .F. from this procedure to prevent the contents of the text file from being appended to the database stored procedures.

Example

* Reports to the screen Event name, where it is called from and ;
* the parameter passed.
PROCEDURE dbc_BeforeAppendProc ;
         (cFileName,;
          nCodePage,;
          lOverwrite)
 ? '>>   ' + 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')
 ? '     lOverwrite      = ' + TRANSFORM(lOverwrite) + ' - ' ;
                         + TYPE('lOverwrite')+' /end/ '
ENDPROC

See Also

Tasks

How to: Enable or Disable DBC Events

Reference

dbc_AfterAppendProc Event

Other Resources

Events (Visual FoxPro)