Topic: error text
Hi Team
the table grid error text. pls see picture in rar file.
My Visual Database → General → error text
Hi Team
the table grid error text. pls see picture in rar file.
Hi Team
the table grid error text. pls see picture in rar file.
See attached
In the search button, you were referring to id_vender and id_department. These are just foreign keys and are integers. The main data is in the department and vender table so you need to reference them instead.
Hi Team
very thanks
Hi Team
how to put symbo $ in table grid.
Hi Team
how to put symbo $ in table grid.
Thanks for your help.
Hi Team
How to backup database everyday.Thanks
Hello Chantait
You can save your database everytime you open your project (first operation)
var Timer : TTimer;
IsSecond : Integer;
procedure Form1_OnShow (Sender: string; Action: string);
begin
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
Timer := TTimer.Create (Form1);
Timer.Interval := 1000;
Timer.Enabled := True;
Timer.OnTimer := @OnTimer;
end;
procedure OnTimer;
begin
iSeconds := iSeconds + 1;
if iSeconds > 10800 then // backup every 3 hours (10800 seconds)
begin
iSeconds := 0;
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
end;
end;
You can do it everytime you close your project :
procedure Form1_OnClose (Sender: string; Action: string);
begin
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
Timer.Free;
end;
or more simply : :
procedure Form1_OnClose (Sender: TObject; Action: string); // sauvegarde d'un seul fichier (sqlite.db)
var vpath: string;
begin
vpath := extractfiledir(application.exename)+'.bu.db';
copyfile('sqlite.db',vpath);
end;
Or save it at regular intervals :
at regular intervals
var
Timer: TTimer;
iSeconds: integer;
procedure Form1_OnShow (Sender: string; Action: string); // A l'ouverture
begin
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
Timer := TTimer.Create (Form1);
Timer.Interval := 1000;
Timer.Enabled := True;
Timer.OnTimer := @OnTimer;
end;
procedure Form1_OnClose (Sender: string; Action: string); // Sauvegarde automatique à la sortie
begin
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
Timer.Free;
end;
procedure OnTimer; // Ici la sauvegarde se fera toutes les 3 heures
begin
iSeconds := iSeconds + 1;
if iSeconds > 10800 then // backup every 3 hours (10800 seconds)
begin
iSeconds := 0;
CopyFile('sqlite.db', 'backup/backup '+ FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db');
end;
end;
begin
end.
Hope this can help you
JB
My Visual Database → General → error text
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi