TurboDB VCL Component Library



Previous  Top  Next

Backs-up the database to the indicated target location.

Delphi syntax:

procedure Backup(TargetLocation: string; DatabaseType: TTdbDatabaseType);

C++ syntax:

void __fastcall Backup(const AnsiString TargetLocation, TTdbDatabaseType DatabaseType);


The database type of the backup database is independent of the original database. It only depends on the DatabaseType argument. The backup location - target directory or target file depending on the database type - must not yet exist. Backup can be called during normal database operation. It tries to obtain a consistent state of the database and copies it to the target location. If it does not succeed within the LockingTimeout, an exception is thrown.