UltraLite User's Guide
C++ API Reference
ULData class
bool Open ( )
bool Open( SQLCA* ca )
bool Open( ul_char* parms )
bool Open( SQLCA* ca , ul_char* parms )
Prepares your application to work with a database. You must open the ULData object before carrying out any other operations on the database using the C++ API. Exceptions to this rule are as follows:
On the Palm Computing Platform, the ULData.PalmLaunch method is called before ULData.Open. The resources that this library requires for your program are allocated and initialized on this call.
On the Palm Computing Platform, call ULData.Open whenever ULData.PalmLaunch returns LAUNCH_SUCCESS_FIRST. For more information, see PalmLaunch method.
Functions that configure database storage can be called. These functions have names starting with ULEnable.
For special purposes, you can specify persistent storage parameters when opening a database to configure caching, encryption, and the database file name. For information on these parameters, see Configuring and managing database storage.
For multi-threaded applications, each thread must open its own ULData object. Neither the ULData object nor the other objects inherited from it (ULConnection and other classes) can be shared across threads.
Open( ) This prototype can be used by most UltraLite applications. Any persistent storage parameters defined in the UL_STORE_PARMS macro are employed when opening the database.
Open( SQLCA* ca ) Use this prototype if you are using embedded SQL as well as the C++ API in your application, and if you have a SQLCA in use, to access the same data using the C++ API.
Open( ul_char* parms ) Persistent storage parameters can be specified using the UL_STORE_PARMS macro. This prototype provides an alternative way of specifying persistent storage parameters. The string is a semicolon-separated list of assignments, of the form parameter=value.
Open( SQLCA *ca, ul_char* parms ) A call specifying both the SQLCA and persistent storage parameters.
For more information on persistent storage parameters, see UL_STORE_PARMS macro.
true (1) if successful.
false (0) if unsuccessful.
The following example declares a ULData object and opens it:
ULData db; db.Open();
Configuring and managing database storage
Developing multi-threaded applications