-
Notifications
You must be signed in to change notification settings - Fork 24
Customize StartDataDigger
Patrick edited this page Nov 27, 2020
·
1 revision
This hook is called when you start or stop a DataDigger window. Within one session you can start multiple DataDigger windows. On starting, this hook is called with parameter piNumber = +1 and on close with piNumber = -1.
A useful example would be to check on the existence of a certain file that indicates maintenance to the database:
/* Check if we are allowed to start */
IF piNumber = 1
AND SEARCH('db-maintenance.txt') <> ? THEN
DO:
MESSAGE 'Sorry, db is in maintenance, please try again later' VIEW-AS ALERT-BOX.
QUIT.
END.
When starting, and the file is found:
After this, the session quits.
Also check the blog for the latest news on DataDigger