My Dump OnBackupProgress - How to use

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gohjoe
Posts: 7
Joined: Thu 17 Jan 2008 14:35

My Dump OnBackupProgress - How to use

Post by gohjoe » Wed 31 Aug 2011 16:30

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

AndreyZ

Post by AndreyZ » Thu 01 Sep 2011 08:46

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.

Post Reply