I'm not sure where to ask 'cause my problem involves Delphi components and firebird DB... Firstly I write here, then i'll try in firebird section.

I'm using the 2 components in subject to backup and restore a firebird DB.
I have 2 functions that handle the 2 services:

function TdataModule1.Backup(const src: string; const dest: string) : boolean;
begin
Result := true;
IBBackupService1.BackupFile.Clear;
IBBackupService1.ServerName := '';
IBBackupService1.DatabaseName := src;
IBBackupService1.BackupFile.Add(dest);
IBBackupService1.Attach;
try
IBBackupService1.ServiceStart;
while not IBBackupService1.Eof do
begin
IBBackupService1.GetNextLine;
end;
IBBackupService1.Detach;
except
IBBackupService1.Detach;
Result := false;
end;
end;

function TdataModule1.Restore(const src: string; const dest: string) : boolean;
begin
Result := true;
IBRestoreService1.DatabaseName.Clear;
IBRestoreService1.BackupFile.Clear;
IBRestoreService1.ServerName := '';
IBRestoreService1.DatabaseName.Add(src);
IBRestoreService1.BackupFile.Add(dest);
IBRestoreService1.Attach;
if IBrestoreService1.Active = true
then
begin
try
IBRestoreService1.ServiceStart;
while not IBRestoreService1.Eof do
begin
IBRestoreService1.GetNextLine;
end;
if IBRestoreService1.Active
then IBRestoreService1.Detach;
except
IBRestoreService1.Detach;
Result := false;
end;
end;
end;


When I call BACKUP every goes ok. I have a new backup file and If I check it with some external progs (IBExpert, gbak) the file looks ok and valid.

But when I call RESTORE I got an error: "Expected backup description record" and the functions exits.
If i try to restore the created file (with my Backup function) with an external prog (IBEXPERT or gbak) everything goes ok.

So BACKUP function works perfectly, but restore one has some kind of problem reading the backup file.

Someone could explain me what is wrong with my code...

Thanks in advance