Contents Index a_db_collation structure a_dblic_info structure

ASA Programming Guide
  The Database Tools Interface
    DBTools structures

a_db_info structure


Function 

Holds the information needed to return dbinfo information using the DBTools library.

Syntax 

typedef struct a_db_info {
unsigned short        version;
MSG_CALLBACK      errorrtn;
const char *         dbname;
unsigned short        dbbufsize;
char *         dbnamebuffer;
unsigned short        logbufsize;
char *         lognamebuffer;
unsigned short        wrtbufsize;
char *         wrtnamebuffer;
a_bit_field         quiet : 1;
a_bit_field         mirrorname_present : 1;
a_sysinfo         sysinfo;
unsigned long         free_pages;
a_bit_field            compressed : 1;
const char *         connectparms;
const char *         startline;

MSG_CALLBACK      msgrtn;
MSG_CALLBACK      statusrtn;
a_bit_field            page_usage : 1;
a_table_info *       totals;
unsigned long         file_size;
unsigned long         unused_pages;
unsigned long         other_pages;
unsigned short        mirrorbufsize;
char *         mirrornamebuffer;
char *         unused_field;
char *         collationnamebuffer;
unsigned short      collationnamebufsize;
char *         classesversionbuffer;
unsigned short      classesversionbufsize;
 } a_db_info;

Parameters 
Member Description
version DBTools version number
errortrn Callback routine for handling an error message
dbname Database file name
dbbufsize The length of the dbnamebuffer member
dbnamebuffer Database file name
logbufsize The length of the lognamebuffer member
lognamebuffer Transaction log file name
wrtbufsize The length of the wrtnamebuffer member
wrtnamebuffer The write file name
quiet Operate without confirming messages
mirrorname_present Set to 1. Indicates that the version of DBTools is recent enough to support the mirrorname field
sysinfo Pointer to a_sysinfo structure
free_pages Number of free pages
compressed 1 if compressed, otherwise 0
connectparms The parameters needed to connect to the database. They take the form of connection strings, such as the following:
"UID=DBA;PWD=SQL;DBF=c:\Program Files\Sybase\SQL Anywhere 9\asademo.db"
For the full range of connection string options, see Connection parameters
startline The 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
msgrtn Callback routine for handling an information message
statusrtn Callback routine for handling a status message
page_usage 1 to report page usage statistics, otherwise 0
totals Pointer to a_table_info structure
file_size Size of database file
unused_pages Number of unused pages
other_pages Number of pages that are neither table nor index pages
mirrorbufsize The length of the mirrornamebuffer member
mirrornamebuffer The transaction log mirror name
collationnamebuffer The database collation name and label (the maximum size is 128+1)
collationnamebufsize The length of the collationnamebuffer member
classesversionbuffer The JDK version of the installed Java classes, such as 1.1.3, 1.1.8, 1.3, or an empty string if Java classes are not installed in the database (the maximum size is 10+1)
classesversionbufsize The length of the classesversionbuffer member
See also 

DBInfo function

For more information on callback functions, see Using callback functions.


Contents Index a_db_collation structure a_dblic_info structure