Contents Index IsOpen method PalmExit method pdf/preface.pdf

UltraLite User's Guide
  C++ API Reference
    ULData class

Open method


Prototype 

bool  Open ( )

bool  Open( SQLCA* ca )

bool  Open( ul_char* parms )

bool  Open( SQLCA* ca , ul_char* parms )

Description 

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:

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.

Parameters 

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.

Returns 

true (1) if successful.

false (0) if unsuccessful.

Example 

The following example declares a ULData object and opens it:

ULData db;
db.Open();
See also 

Close method

Configuring and managing database storage

Developing multi-threaded applications

UL_STORE_PARMS macro


Contents Index IsOpen method PalmExit method pdf/preface.pdf