ULCreateParms class

UL Ext.: Builds a string of creation-time options for creating an UltraLite database.

Syntax
Visual Basic
Public Class ULCreateParms
C#
public class ULCreateParms
Remarks

A ULCreateParms object is used to specify the parameters for creating a database (ULDatabaseManager.CreateDatabase(string,byte[],string)).

Leading and trailing spaces are ignored in all string values. Values must not contain leading or trailing spaces, or a semicolon (;), or begin with either a single quote (') or a double quote (").

Once you have supplied all the creation parameters by setting the appropriate properties on a ULCreateParms object, you create a creation parameters string using the ULCreateParms.ToString. The resulting string can then be used as the createParms parameter of the ULDatabaseManager.CreateDatabase(string,byte[],string) method.

For more information, see UltraLite connection parameters.

Example

The following code creates the database \UltraLite\MyDatabase.udb on a Windows Mobile device. The database is created case sensitive and with the UTF8 character set.

' Visual Basic
Dim createParms As ULCreateParms = New ULCreateParms
createParms.CaseSensitive = True
createParms.UTF8Encoding = True
Dim openParms As ULConnectionParms = New ULConnectionParms
openParms.DatabaseOnCE = "\UltraLite\MyDatabase.udb"
' Assumes file coll_1250LATIN2.vb is
' also compiled in the current project
ULConnection.DatabaseManager.CreateDatabase( _
    openParms.ToString(), _
    iAnywhere.UltraLite.Collations.Collation_1250LATIN2.Data, _
    createParms.ToString() _
  )
Dim conn As ULConnection = _
  New ULConnection( openParms.ToString() )
conn.Open()
// C#
ULCreateParms createParms = new ULCreateParms();
createParms.CaseSensitive = true;
createParms.UTF8Encoding = true;
ULConnectionParms openParms = new ULConnectionParms();
openParms.DatabaseOnCE = @"\UltraLite\MyDatabase.udb";
// Assumes file coll_1250LATIN2.vb is
// also compiled in the current project
ULConnection.DatabaseManager.CreateDatabase(
    openParms.ToString(),
    iAnywhere.UltraLite.Collations.Collation_1250LATIN2.Data,
    createParms.ToString()
  );
ULConnection conn = new ULConnection( openParms.ToString() );
conn.Open();
See also

ULCreateParms members
ULCreateParms constructor
CaseSensitive property
ChecksumLevel property
DateFormat property
DateOrder property
FIPS property
MaxHashSize property
NearestCentury property
Obfuscate property
PageSize property
Precision property
Scale property
TimeFormat property
TimestampFormat property
TimestampIncrement property
UTF8Encoding property
ToString method