dbc_BeforeValidateData Event
Occurs immediately before the VALIDATE DATABASE command runs.
PROCEDURE dbc_BeforeValidateData
(lRecover, lNoConsole, lPrint, lFile [, cFilename])
-or-
PROCEDURE dbc_BeforeValidateData
LPARAMETERS lRecover, lNoConsole, lPrint, lFile [, cFilename]
Parameters
- lRecover
Specifies whether the RECOVER keyword was included in the VALIDATE DATABASE command that triggered this event. - lNoConsole
Specifies whether the NOCONSOLE keyword was included in the VALIDATE DATABASE command that triggered this event. - lPrint
Specifies whether the PRINT keyword was included in the VALIDATE DATABASE command that triggered this event. - lFile
Specifies whether the FILE keyword was included in the VALIDATE DATABASE command that triggered this event. - cFilename
Specifies the name of the output file named in the TO FILE clause of the VALIDATE DATABASE command. cFilename is optional, but if you omit it and use the TO FILE clause of VALIDATE DATABASE, you will receive the error "Must specify additional parameters." If you do not use TO FILE and include the cFilename parameter, it will be passed a value of .F..
Remarks
You can use the dbc_BeforeValidateData event to track attempted access to the database before data are validated.
Return .F. from this procedure to prevent the database from being validated.
Example
* Reports to the screen Event name, where it is called from and ;
* the parameters passed.
PROCEDURE dbc_BeforeValidateData;
(lRecover, ;
lNoConsole, ;
lPrint, ;
lFile, ;
cFileName)
? '>> ' + PROGRAM()
?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
? ' lRecover = ' + TRANSFORM(lRecover) + ' - ' ;
+ TYPE('lRecover')
? ' lNoConsole = ' + TRANSFORM(lNoConsole) + ' - ' ;
+ TYPE('lNoConsole')
? ' lPrint = ' + TRANSFORM(lPrint) + ' - ' ;
+ TYPE('lPrint')
? ' lFile = ' + TRANSFORM(lFile) + ' - ' ;
+ TYPE('lFile')
? ' cFileName = ' + TRANSFORM(cFileName) + ' - ' ;
+ TYPE('cFileName ')+' /end/ '
ENDPROC