Delphi 7 + IBX + FB 1.5.2.4787

1. Pessoal, como descobrir se houve algum erro durante o evento de backup 
abaixo?
2. Um simples Try/Except resvolveria para tratar os erros no evento abaixo?

Um abraço,

Valdir Marcos


http://bdn.borland.com/article/borcon/files/6100/paper/6100.html#IBBackupService
procedure TMainForm.BackupBtnClick(Sender: TObject);
begin
  with IBBackupService do
  begin
    BuMemo.Lines.Clear;
    try
      ShowWait;
      Active := True;
      ServiceStart;
      while not EOF do      begin
        BuMemo.Lines.Add(GetNextLine);        Application.ProcessMessages;      
 end;       end;
    finally
      Active := False;
      ShowNormal;
    end; //try
  end; //with
end;
IBBackupService
In this example the output of the backup operation is shown in the memo 
component named BuMemo. To retrieve the backup progress messages you must set 
the Verbose property to True then call the GetNextLine method repeatedly until 
the backup is finished. In the code shown above setting the Active property to 
True attaches the component to the Interbase backup service on the designated 
server. Calling the ServiceStart method actually starts the backup operation. 
The while loop calls GetNextLine to retrieve the next progress message and adds 
the message to the memo component. This continues until the IBBackup 
component's EOF property is True signalling the end of the backup.

The Options property of IBBackupService gives you the same backup options 
provided by gbak. The options are:

      IgnoreChecksum Ignore checksum errors in the database. 
      IgnoreLimbo Ignore transactions in the limbo state. 
      MetadataOnly Backup the metadata but not the data so a restore will 
create a new empty database. 
      NoGarbageCollection Do not delete old record versions. 
      OldMetadataDesc Backup metadata in the old format. 
      NonTransportable Backup in non-transportable format. This will be faster 
but the backup cannot be restored on another platform. 
      ConvertExtTables Convert external tables to internal tables and back them 
up. 


[As partes desta mensagem que não continham texto foram removidas]



-- 
<<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>

<*> Para ver as mensagens antigas, acesse:
    http://br.groups.yahoo.com/group/delphi-br/messages

<*> Para falar com o moderador, envie um e-mail para:
    [EMAIL PROTECTED]
 
Links do Yahoo! Grupos

<*> Para visitar o site do seu grupo na web, acesse:
    http://br.groups.yahoo.com/group/delphi-br/

<*> Para sair deste grupo, envie um e-mail para:
    [EMAIL PROTECTED]

<*> O uso que você faz do Yahoo! Grupos está sujeito aos:
    http://br.yahoo.com/info/utos.html

 


Responder a