IBCBackupService Parameters Missing/Incorrect

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
douglaskeene
Posts: 8
Joined: Mon 11 Mar 2013 12:53

IBCBackupService Parameters Missing/Incorrect

Post by douglaskeene » Sun 28 Feb 2021 16:53

Hello All
I am using IBCBackupService to restore a Firebird Database from a backup file (*.fbk).

I am getting an error 'Query parameters missing or incorrect'

Code: Select all

function MIBRestoreFile(MFileName: TFileName): Boolean;
var
   aLine: String;
begin
   result := FALSE;
   with DMIB.IBCRestoreService1 do
   begin
      DMIB.IBEnvironment.Connected := FALSE;
      Server := '';
      LoginPrompt := FALSE;
      UserName := 's***';
      Password := 'm****';
      Active := True;
      try
         DMIB.IBCBackupService1.ClientLibrary := DMIB.IBEnvironment.ClientLibrary;
         Verbose := False;
         Options := [roReplace, roUseAllSpace];
         PageBuffers := 3000;
         PageSize := 4096;
         Database.Clear;
         Database.Add(GDataLocation + 'RMAINENVIRONMENT.fdb');

         BackupFile.Clear;
         BackupFile.Add(MFileName);
         ServiceStart;
         while not EOF do
         begin
            try
               aLine:=DMIB.IBCBackupService1.GetNextLine;   **************EXCEPTION NOTIFICATION HERE
            except
               aLine:='Exc. ';
            end;
            Form1.MDisplayMessage(aLine, TRUE);
         end;
      finally
          Active := FALSE;
      end;
   end;
end;
I tried setting verbose to false, etc. Any ideas here?
Thank you
Doug

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: IBCBackupService Parameters Missing/Incorrect

Post by oleg0k » Tue 02 Mar 2021 20:56

Hello,
Replace line

Code: Select all

              aLine:=DMIB.IBCBackupService1.GetNextLine;   //**************EXCEPTION NOTIFICATION HERE
with

Code: Select all

              aLine:= DMIB.IBCRestoreService1.GetNextLine;  // **************NO EXCEPTION
wbr, Oleg
Devart Team

Post Reply