Utility Functions : List of Utility Functions : stm_init_uad

stm_init_uad
Initializes the database for information retrieval by the Dataport functions, and checks the user access rights and user license.
The stm_init_uad function automatically changes the current directory to the workarea directory. All references to files inside the program have to take this into account. When the program terminates, it does not return to the original directory.
Function Type
stm_boolean
Syntax
stm_init_uad (proj_name, workarea, trans_mode, &status)
Arguments
Input/Output
automatic_transaction - An implicit start_transaction is performed when you initialize and an implicit commit_transaction is performed when you finish the retrieval process
self_transaction - You can control when the start_transaction and commit_transaction is performed for an accurate picture of the database when the functions are used.
Status Codes
Example
To initialize the database, use the following statements:

int success, status;
.
.
success = stm_init_uad ("A5S700", "/a5/general",
automatic_transaction, &status);
.
.
.
This function initializes the workarea for project A5S700, which is found in the directory /a5/general. The transactions are started automatically and finished automatically by the init and finish functions. The status should be checked in case the function fails and returns false.