Topic: Backup
Hi.
As script can be copied to another file sqlite.db subfolder?
Like a backup and go overwriting the existing subfolder sqlite.db.
Thanks again.
My Visual Database → Script → Backup
Hi.
As script can be copied to another file sqlite.db subfolder?
Like a backup and go overwriting the existing subfolder sqlite.db.
Thanks again.
Hello,
if the file sqlite.db in the project folder, also you should create folder "Backup"
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
CopyFile('sqlite.db', 'Backup\sqlite.db');
end;
Thanks for the reply, but it does not work.
An error that says - undeclared identifier: 'CopyFile'.
Please, download latest version 1.45
http://myvisualdatabase.com/download/myvisualdb.exe
It Works.
Thank you
Hi,
Indeed make a copy but if you click No in the dialog box then still MVDB create a copy? See script below.
procedure Form1_btBackup_OnClick (Sender: string; var Cancel: boolean);
begin
if 7 = MessageDlg('Create / Update the SqLiteDB? Best choice is every day on the end of the shift back it up.', mtConfirmation, mbYes + mbNo, 0) then
Cancel := True;
CopyFile('sqlite.db', 'Backup\sqlite.db'); // Application path
// CopyFile('sqlite.db', 'I:\TP2014\Backup\sqlite.db'); // Reserve path
// P:\C\CF\CF3\TEST GA en MB\TP2014\Backup\sqlite.db // Backup path workplace
end;
Thanks
carlo_dj
you forgot to write Begin and End after Then
procedure Form1_btBackup_OnClick (Sender: string; var Cancel: boolean);
begin
if 7 = MessageDlg('Create / Update the SqLiteDB? Best choice is every day on the end of the shift back it up.', mtConfirmation, mbYes + mbNo, 0) then
begin
Cancel := True; // I think it is not necessary
CopyFile('sqlite.db', 'Backup\sqlite.db'); // Application path
//CopyFile('sqlite.db', 'I:\TP2014\Backup\sqlite.db'); // Reserve path
//P:\C\CF\CF3\TEST GA en MB\TP2014\Backup\sqlite.db // Backup path workplace
end;
end;
Hello,
Indeed you're right. copy works correctly now. But it works the other way around. No clicks is a copy and click Yes is no copy made?
Thanks
Change if 7 = MessageDlg to if 6 = MessageDlg
6 = MessageDlg = correct, thanks
Hello Dimitri
It works well with your script
But, how should be this script if I want to let users choose their own folder to realise this backup
I mean by way of function OpenDialog that could be created on runing
with TOpenDialog.Create(self); ?
Is it possible ?
Thanks for your answer
Jean B.
My Visual Database → Script → Backup
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi