[ + ] This example explains how to use the triggers with WINDEV.
A trigger is a WLanguage procedure automatically called by the HFSQL engine whenever a HFSQL function is run.
The following topics are presented in this example:
1/ how to branch a trigger on a HFSQL function
2/ the code that must be used in the function called by trigger.
Summary of the example supplied with WINDEV:
This application is used to enter the expenses for the contributors of a company.
Two modes can be used:
- the mode with read/write rights
- the mode with read-only rights.
The triggers will be used to control the access to the files according to the current mode.
In this example, the triggers are also used to write the different events into a log file.
This log file can be directly consulted in the application.