Backup and restore

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flzanini
Posts: 17
Joined: Wed 29 Jul 2009 13:08

Backup and restore

Post by flzanini » Mon 30 Nov 2009 13:26

Hi,

I'm trying to add the backup and restore environments in my application, but I have some doubts:

My application is a Windows Service and I use the Firebird 2.1.3 embbeded. The user configures a schedule to start the backup, and the program can't be closed while the backup is running.

I see that backup and restore components works when I call the StartService method, but don't have events to retrieve the backup state, like OnFinished.

The process run in a separate thread? How I can check if the backup is finished?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 03 Dec 2009 10:25

You can use the IsServiceRunning method to detect if the service is still running.

flzanini
Posts: 17
Joined: Wed 29 Jul 2009 13:08

Post by flzanini » Fri 04 Dec 2009 12:28

But if the program is closed while the service is running, an exception occurs

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 04 Dec 2009 13:02

Add the following code for the OnClose event of TForm:

Code: Select all

while IBCBackupService.IsServiceRunning do
begin
end;

flzanini
Posts: 17
Joined: Wed 29 Jul 2009 13:08

Post by flzanini » Wed 09 Dec 2009 11:48

The service runs in the main thread?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 10 Dec 2009 08:50

The service runs in a thread created by the Firebird server.

Post Reply