Contents Index Building the CustDB sample application Deploying Windows CE applications

UltraLite Embedded SQL User's Guide
  Developing UltraLite Applications for Windows CE

Storing persistent data


The UltraLite database is stored in the Windows CE file system. The default file is \UltraLiteDB\ul_<project>.udb, with project being truncated to eight characters. You can override this choice using the file_name parameter which specifies the full pathname of the file-based persistent store.

The UltraLite runtime carries out no substitutions on the file_name parameter. If a directory has to be created in order for the file name to be valid, the application must ensure that any directories are created before calling db_init.

As an example, you could make use of a flash memory storage card by scanning for storage cards and prefixing a name by the appropriate directory name for the storage card. For example,

file_name = "\\Storage Card\\My Documents\\flash.udb"
Example 

The following sample embedded SQL code sets the file_name parameter:

#undef UL_STORE_PARMS
#define UL_STORE_PARMS UL_TEXT(
   "file_name=\\uldb\\my own name.udb;cache_size=128k" )
...
db_init( &sqlca );

Contents Index Building the CustDB sample application Deploying Windows CE applications