I am having a problem with the BackupService and I'm hoping someone can tell me what the problem is. I have a small database, < 1MG. It's taking about 3 minutes to back it up using the service. If I turn verbose output on I can see a definite lag. It is also just as slow if I do not use the verbose option. Any suggestions?
I should also mention that the database is local and the rest of the program accesses the database very quickl.
Here's my code:
Code: Select all
with dtmdlDatabaseMain do begin
BackupService.ClientLibrary := 'gds32.dll';//with Path, if not in Windows\system32
BackupService.Protocol := TCP;//for const TCP include Unit IBC
BackupService.LoginPrompt := False;//show no Login window
BackupService.Username := 'USER';
BackupService.Password := 'password';
BackupService.Server := '';
BackupService.Database := ExtractFilePath(Application.ExeName)+DATA_PATH+DATA_FILE_NAME;
BackupService.BackupFile.Text := FBackupFileName;
BackupService.Verbose := True;
BackupService.Attach;//connect to DB
BackupService.ServiceStart;//run backup
while not BackupService.EOF do begin
Progress.Caption := 'Attempting Database Backup...'+#13+BackupService.GetNextLine;;
end;
end;