Page 1 of 1

My Dump OnBackupProgress - How to use

Posted: Wed 31 Aug 2011 16:30
by gohjoe
Hi:

Can you give me some examples on how to use the OnBackupProgress of the MyDump component?

How to use it to extract the number of files to be processed, the number processed and percent of progress?

Joe

Posted: Thu 01 Sep 2011 08:46
by AndreyZ
Hello,

Here is an example:

Code: Select all

procedure TMainForm.MyDump1BackupProgress(Sender: TObject;
  ObjectName: String; ObjectNum, ObjectCount, Percent: Integer);
begin
  Label1.Caption := 'Object name: ' + ObjectName;
  Label2.Caption := 'Object ' + IntToStr(ObjectNum + 1) + ' of ' + IntToStr(ObjectCount);
  ProgressBar1.Position := Percent;
end;
There are three variables in the OnBackupProgress event handler. ObjectName indicates the name of the database object that is being dumped. ObjectNum shows the number of the current database object in the backup queue starting from zero. ObjectCount shows the quantity of database objects to dump. Percent parameter shows the current percentage of the current table data dumped, it is not the percentage of the entire dump process. For more information, please read the MyDAC documentation.