![]() ![]() |
|
CREATE-TRIGGERThe CREATE-TRIGGER command is used to specify the database events for which the trigger subroutine is called.
COMMAND SYNTAXCREATE-TRIGGER -Options FileName {triggername|*} subroutine
SYNTAX ELEMENTSFileName can reference either a jBASE hashed file or a directory. triggername must be * or one of the nine database events: POSTOPEN, PREREAD, POSTREAD, PREWRITE, POSTWRITE, PREDELETE, POSTDELETE, PRECLEAR, POSTCLEAR. If * is specified then the trigger subroutine will be called for each of the nine database events. The valid options for CREATE-TRIGGER are:
subroutine is the name of a jBC subroutine. Also see Trigger API.
NOTESCREATE-TRIGGER can be run multiple times for the same file. If a trigger has already been defined for the specified event then the overwrite flag must be used to effect the change.
EXAMPLESCREATE-TRIGGER BP POSTOPEN SUBBPOPEN CREATE-TRIGGER -o PAYROLL * SUBBP |