ASA Programming Guide
The Database Tools Interface
DBTools structures
Holds the information needed to carry out backup tasks using the DBTools library.
typedef struct a_backup_db {
unsigned short version;
const char * output_dir;
const char * connectparms;
const char * startline;
MSG_CALLBACK confirmrtn;
MSG_CALLBACK errorrtn;
MSG_CALLBACK msgrtn;
MSG_CALLBACK statusrtn;
a_bit_field backup_database : 1;
a_bit_field backup_logfile : 1;
a_bit_field backup_writefile : 1;
a_bit_field no_confirm : 1;
a_bit_field quiet : 1;
a_bit_field rename_log : 1;
a_bit_field truncate_log : 1;
a_bit_field rename_local_log: 1;
const char * hotlog_filename;
char backup_interrupted;
} a_backup_db;
Member | Description |
---|---|
Version | DBTools version number |
output_dir |
Path to the output directory. For example:
"c:\backup" |
connectparms |
Parameters needed to connect to the database. They take the form of connection strings, such as the following:
"UID=DBA;PWD=SQL;DBF=c:\asa\asademo.db"For the full range of connection string options, see Connection parameters |
startline |
Command-line used to start the database engine. The following is an example start line:
"c:\asa\win32\dbeng9.exe"The default start line is used if this member is NULL |
confirmrtn | Callback routine for confirming an action |
errorrtn | Callback routine for handling an error message |
msgrtn | Callback routine for handling an information message |
statusrtn | Callback routine for handling a status message |
backup_database | Backup the database file (1) or not (0) |
backup_logfile | Backup the transaction log file (1) or not (0) |
backup_writefile | Backup the database write file (1) or not (0), if a write file is being used |
no_confirm | Operate with (0) or without (1) confirmation |
quiet | Operate without printing messages (1), or print messages (0) |
rename_log | Rename the transaction log |
truncate_log | Delete the transaction log |
rename_local_log | Rename the local backup of the transaction log |
hotlog_filename | File name for the live backup file |
backup_interrupted | Indicates that the operation was interrupted |
For more information on callback functions, see Using callback functions.