Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - C and C++ Programming » UltraLite C/C++ Common API Reference

MLFileTransfer function Next Page

ULCreateDatabase function

Creates an UltraLite database.


ul_bool ULCreateDatabase ( SQLCA * sqlca,
ul_char * connection-parms,
void const * collation,
ul_char * creation-parms,
void * reserved


sqlca    A pointer to the initialized SQLCA.

connection-parms    A semicolon separated string of connection parameters, which are set as keyword value pairs. The connection string must include the name of the database. These parameters are the same set of parameters that may be specified when you connect to a database. For a complete list, see UltraLite Connection String Parameters Reference.

collation    The desired collation sequence for the database. You can get a collation sequence by calling the appropriate function. For example:

void const * collation = ULGetCollation_1250LATIN2(); 

The function name is constructed by prefixing the name of the desired collation with ULGetCollation_. For a list of all available collation functions see install-dir\h\ulgetcoll.h. You must include this file in programs that call any of the ULGetCollation_ functions.

creation-parms    A semicolon separated string of connection parameters, which are set as keyword value pairs. For example:


For a complete list, see Choosing creation-time database properties for UltraLite.

reserved    This parameter is reserved for future use.


The database is created with information provided in two sets of parameters:

Applications can call this function after initializing the SQLCA.


The following code illustrates using ULCreateDatabase to create an UltraLite database as the file C:\myfile.udb.

if( ULCreateDatabase(&sqlca 
   // success