yhackup Posted April 5, 2021 Share Posted April 5, 2021 hello sorry for my english. I am using MYDac TMyDump component in one of my projects. While backing up the database, I can track the progress from the BackupProgress event, but not on unigui form image unit BackupUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIForm, DataModules, uniMemo, uniGUIBaseClasses, uniProgressBar, DADump, MyDump, uniButton, uniBitBtn, uniSpeedButton, uniPanel, ServerModule, uniTimer, uniThreadTimer, Data.DB, uniBasicGrid, uniDBGrid, dxmdaset; type TBackupForm = class(TUniForm) MyDump1: TMyDump; UniProgressBar1: TUniProgressBar; UniPanel1: TUniPanel; UniSpeedButton1: TUniSpeedButton; UniMemo1: TUniMemo; procedure MyDump1BackupProgress(Sender: TObject; ObjectName: string; ObjectNum, ObjectCount, Percent: Integer); procedure UniSpeedButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; function BackupForm: TBackupForm; implementation {$R *.dfm} uses MainModule, uniGUIApplication; function BackupForm: TBackupForm; begin Result := TBackupForm(UniMainModule.GetFormInstance(TBackupForm)); end; procedure TBackupForm.MyDump1BackupProgress(Sender: TObject; ObjectName: string; ObjectNum, ObjectCount, Percent: Integer); begin UniProgressBar1.Max := ObjectCount * 100; UniProgressBar1.Position := ObjectNum * Percent; UniSession.Synchronize; end; procedure TBackupForm.UniSpeedButton1Click(Sender: TObject); begin if not DirectoryExists(UniServerModule.FilesFolderPath + 'backup\') then CreateDir(UniServerModule.FilesFolderPath + 'backup\'); MyDump1.BackupToFile(UniServerModule.FilesFolderPath + 'backup\' + formatdatetime('hh_nn_ss_dd_mm_yyyy', Now) + '.sql'); end; end. Quote Link to comment Share on other sites More sharing options...
alfr Posted April 5, 2021 Share Posted April 5, 2021 MainModule.EnableSynchronousOperations must be set to true.? Quote Link to comment Share on other sites More sharing options...
yhackup Posted April 5, 2021 Author Share Posted April 5, 2021 47 minutes ago, alfr said: MainModule.EnableSynchronousOperations must be set to true.? i didn't know i will try Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 5, 2021 Share Posted April 5, 2021 7 minutes ago, yhackup said: i didn't know i will try Hi Which version and build are you using? Quote Link to comment Share on other sites More sharing options...
yhackup Posted April 5, 2021 Author Share Posted April 5, 2021 4 hours ago, Hayri ASLAN said: Hi Which version and build are you using? bought it a few days ago, the latest version Quote Link to comment Share on other sites More sharing options...
yhackup Posted April 5, 2021 Author Share Posted April 5, 2021 It worked as I wanted. Thanks let's make it a little more beautiful https://resmim.net/i/3Ui02 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 5, 2021 Share Posted April 5, 2021 30 minutes ago, yhackup said: bought it a few days ago, the latest version Please adjust your forum email address: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.