![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for RAD Studio 10.2 (Delphi Win64) » Using DBISAM » Backing Up and Restoring Databases |
The local database has the following tables: Table Name ------------------------------------- Customers Orders Items
var TablesToBackup: TStrings; begin TablesToBackup:=TStringList.Create; try with MyDatabase do begin DatabaseName:='MyDatabase'; Directory:='d:\temp'; with TablesToBackup do begin Add('Customers'); Add('Orders'); Add('Items'); end; if Backup('d:\temp\'+ StringReplace(DateToStr(Date), '/','',[rfReplaceAll])+'.bkp', 'Daily Backup for '+DateToStr(Date),6, TablesToBackup) then ShowMessage('Backup was successful') else ShowMessage('Backup failed'); end; finally TablesToBackup.Free; end; end;
The local database has the following tables: Table Name ------------------------------------- Customers Orders Items
var TablesToRestore: TStrings; begin TablesToRestore:=TStringList.Create; try with MyDatabase do begin DatabaseName:='MyDatabase'; Directory:='d:\temp'; with TablesToRestore do Add('Customers'); if Restore('d:\temp\'+ StringReplace(DateToStr(Date), '/','',[rfReplaceAll])+'.bkp', TablesToRestore) then ShowMessage('Restore was successful') else ShowMessage('Restore failed'); end; finally TablesToRestore.Free; end; end;
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |