TIBCBackupService in Thread

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
o_robert
Posts: 5
Joined: Tue 14 Aug 2012 08:42

TIBCBackupService in Thread

Post by o_robert » Tue 14 Aug 2012 08:53

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 ?

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: TIBCBackupService in Thread

Post by ZEuS » Wed 15 Aug 2012 11:50

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; 

o_robert
Posts: 5
Joined: Tue 14 Aug 2012 08:42

Re: TIBCBackupService in Thread

Post by o_robert » Wed 15 Aug 2012 15:01

It's working.

Thanks.

Post Reply