UltraLite Database User's Guide
Static Development Model Reference
Macros and compiler directives for UltraLite C/C++ applications
Supply a set of keyword-value pairs to configure database storage.
#define UL_STORE_PARMS UL_TEXT( "keyword=value;..." )
All spaces in the keyword-value list are significant, except spaces at the start of the string and any spaces that immediately follow a semicolon.
Define the UL_STORE_PARMS macro in the header of your application source code so that it is visible to all db_init() calls.
Keywords are case insensitive. The case sensitivity of the values depends on the application interpreting it. For example, the case sensitivity of the filename depends on the operating system.
For a list of available parameters, see Database schema parameters, and Additional connection parameters.
The following statements set the cache size to 128 kb.
#undef UL_STORE_PARMS
#define UL_STORE_PARMS UL_TEXT("cache_size=128k")
. . .
db_init( &sqlca );You can set UL_STORE_PARMS to a string, then set the value of that string programmatically before calling db_init, as in the following example. The UL_TEXT macro and the _stprintf function are used to achieve proper character encoding.
char store_parms[32];
#undef UL_STORE_PARMS
#define UL_STORE_PARMS store_parms
...
/* Set cache_size to the correct number of bytes. */
...
_stprintf( store_parms, UL_TEXT("cache_size=%lu"),
cache_size );
db_init( &sqlca );Additional connection parameters
Configuring and managing database storage
Encrypting UltraLite databases