透過TFDSQLiteSecurity可以對資料庫進行加密處理:
with sqlSecurity do begin Database := 'x:\path_to_database\db.sdb'; Password := 'p@ssword'; ToPassword := 'p@ssword_changed'; case rgSecActions.ItemIndex of//是一個radiogroup C_SET_PASSWORD: SetPassword;//0 C_REMOVE_PASSWORD: RemovePassword;//1 C_CHANGE_PASSWORD: ChangePassword;//2 end; end;
透過TFDSQLiteValidate可以對資料庫進行檢查、分析和空間清理。
with sqlValidate do begin Database := 'x:\path_to_database\db.sdb'; Password := 'p@ssword'; case rgValActions.ItemIndex of C_ANALYZE: Analyze; C_CHECKONLY: if not CheckOnly then Memo1.Lines.Add('Database has problems !') else Memo1.Lines.Add('Database is valid'); C_SWEEP: Sweep; end; end;
透過 TFDSQLiteBackup可以對資料庫進行備份操作。
with sqlBackup do begin Database := 'x:\path_to_database\db.sdb'; DestDatabase := 'x:\path_to_database\db.backup'; Password := 'p@ssword'; DestPassword := 'dest_p@ssword'; Backup; end;