You can encrypt the database file before application will be closed, and decrypt the database file if application catch error that database is encrypted. Example:
// global event for all exceptions related database
function OnSQLException(Sender: TObject; Msg: string; SQL: string): boolean;
begin
if Pos('file is encrypted or is not a database', Msg)>0 then
begin
result := True; // to prevent system message
Form1.SQLConnection.Connected := False;
DecryptFileRC5('sqlite.db', 'password');
end;
end;
procedure Form1_OnClose (Sender: TObject; Action: string);
begin
Form1.SQLConnection.Connected := False;
EncryptFileRC5('sqlite.db', 'password');
end;
Also you can check out more advanced solutions
https://stackoverflow.com/questions/566 … protection
If you want to protect your data, you can use MySQL DMBS, so your data will be stored on remote server.
Also you can use SSL connection to MySQL, to protect your data more strong.
http://myvisualdatabase.com/forum/viewtopic.php?id=4274
Dmitry.