Sybase central gives the user a quantity of options to mantain and backup databases. It’s also possible to set up triggers, so I thought to use this option to control the execution of backups from Servoy.
The procedure is quite simple:
create a field in a table (an integer is fine), let’s call it “launcher”
create a trigger with this command
BEGIN
BACKUP DATABASE DIRECTORY '/Users/test/Servoy/backupfolder/'
END
and set it to activate with data-changes (the trigger wizard is very helpful, and all the steps are easy to follow)
in Servoy, create a method like:
switch (launcher)
{
case 1:
launcher = 0
break;
case 0:
launcher = 1
break;
default:
break;
}
This way, every time you launch this method, you’ll activate the trigger and the trigger will perform an online backup.
servoy_slider.jar (1.85 KB)