createDatabase method

Creates a database and opens a connection to the database as specified by access_parms.

Syntax
Connection createDatabase(
String access_parms ,
PODSArray *coll_bytes,
String create_parms
)
Parameters
  • access_parms   Parameters for connecting to the database. access_parms is used to specify connection parameters (including the database file name and location) and to open the connection.

    See Connecting to an UltraLite database.

  • coll_bytes   A byte array defining a database collation to use for the database to be created. Several source files are supplied with UltraLite as JavaScript source files (.js) in install-dir\UltraLite\Collations\js\ with file names of the form coll_XXXXX.js where XXXXX represents the collation name. For example, coll_1250LATIN2.js.

    The collation file must be included in the main html file before the database logic. The byte array variable is defined in the coll_XXXXX.js file.

  • create_parms   Parameters for creating the database. Parameter keywords are case-insensitive, and most values are case-sensitive. create_parms is used to specify parameters that can be specified only at database creation.

    See Choosing database creation parameters for UltraLite.

Returns

No return value.

Remarks

If the database already exists, a SQLE_DATABASE_NOT_CREATED exception is thrown.

Only one database may be active at a given time. Attempts to open a connection to a database result in an error if there are connections open to a different database.