ASA Programming Guide
The Database Tools Interface
DBTools functions
Prepares the DBTools library for use.
short DBToolsInit( const a_dbtools_info * dbtools-info );
Parameter | Description |
---|---|
dbtools-info | Pointer to a_dbtools_info structure |
A return code, as listed in Software component return codes.
The primary purpose of the DBToolsInit function is to load the Adaptive Server Anywhere language DLL. The language DLL contains localized versions of error messages and prompts that DBTools uses internally.
The DBToolsInit function must be called at the start of any application that uses the DBTools interface, before any other DBTools functions.
The following code sample illustrates how to initialize and clean up DBTools:
a_dbtools_info info; short ret; memset( &info, 0, sizeof( a_dbtools_info) ); info.errorrtn = (MSG_CALLBACK)MakeProcInstance( (FARPROC)MyErrorRtn, hInst ); // initialize DBTools ret = DBToolsInit( &info ); if( ret != EXIT_OKAY ) { // DLL initialization failed ... } // call some DBTools routines . . . ... // cleanup the DBTools dll DBToolsFini( &info );