Page 1 of 1
TIBCBackupService in Thread
Posted: Tue 14 Aug 2012 08:53
by o_robert
Can i run TIBSBackupService in Thread ?
When i set and run:
backup.user, password, database, BackupFile, attach, ServiceStart
backup file is created, but backup "not working" - file size is always 0. When i check IsServiceRunning - always is true;
Maybe problem with ProcessMesages ?
Re: TIBCBackupService in Thread
Posted: Wed 15 Aug 2012 11:50
by ZEuS
It seems that you set the IBCBackupService.Verbose property to True in order to perform backup in the verbose mode, but don't retrieve the backup log from the service. So, the output buffer of the service is never becomes empty and the service can not stop.
To avoid the problem please try one of the following approaches:
- set the IBCBackupService.Verbose property to False to avoid using the verbose mode;
- if there is need to use the verbose mode, you should use the code like shown below after the service start:
Code: Select all
var
fLogLine: string;
...
while not (IBCBackupService.Eof) do begin
fLogLine := IBCBackupService.GetNextLine;
// do something with the log line ...
end;
Re: TIBCBackupService in Thread
Posted: Wed 15 Aug 2012 15:01
by o_robert
It's working.
Thanks.