TUniDump.OnBackupProgress
Posted: Mon 29 Oct 2012 16:45
Hi,
I have a strange behaviour with the OnBackupProgress event.
With the Oracle provider, I drop on a form a TUniConnection, a TUniDump, a TLabel and a TButton. On the button click, I call the BackupToFile method. And I try to display the percentage of completion :
What happens at runtime ? I see the percentage going from 4% to 100%, then it goes back to 52%, and up to 100% again, then returns to 64%, etc. At the end, it blinks a hundred times between 99% and 100%. Then the file is generated successfully.
Maybe this event is not intended to display the percentage of completion for a final user. Or maybe you will not be able to reproduce if it depends on my data. But I was able to reproduce on 2 different Oracle schemas.
What is your feeling ?
Thanks
Guillaume
I have a strange behaviour with the OnBackupProgress event.
With the Oracle provider, I drop on a form a TUniConnection, a TUniDump, a TLabel and a TButton. On the button click, I call the BackupToFile method. And I try to display the percentage of completion :
Code: Select all
procedure TForm5.Button1Click(Sender: TObject);
begin
UniConnection1.Connected := True;
UniDump1.OnBackupProgress := ProgressEvent;
UniDump1.BackupToFile('D:\Temp\Test.txt');
end;
procedure TForm5.ProgressEvent(Sender: TObject; ObjectName: String; ObjectNum: Integer; ObjectCount: Integer; Percent: Integer);
begin
Label1.Caption := IntToStr(Percent) + '%';
Application.ProcessMessages;
end;
Maybe this event is not intended to display the percentage of completion for a final user. Or maybe you will not be able to reproduce if it depends on my data. But I was able to reproduce on 2 different Oracle schemas.
What is your feeling ?
Thanks
Guillaume