Creates a new UltraLite database.
Public Shared Sub CreateDatabase( ByVal connString As String, ByVal createParms As String )
public static void CreateDatabase(string connString, string createParms)
connString The parameters for identifying a database in the form of a semicolon-separated list of keyword-value pairs.
createParms The parameters used to configure the new database in the form of a semicolon-separated list of keyword-value pairs.
ULException class A SQL error occurred.
The following code creates the database \UltraLite\MyDatabase.udb on a Windows Mobile device then opens a connection to it.
' Visual Basic Dim openParms As ULConnectionParms = New ULConnectionParms openParms.DatabaseOnDevice = "\UltraLite\MyDatabase.udb" ULConnection.DatabaseManager.CreateDatabase( _ openParms.ToString(), _ "" _ ) Dim conn As ULConnection = _ New ULConnection( openParms.ToString() ) conn.Open()
The following code is the C# language equivalent:
// C# ULConnectionParms openParms = new ULConnectionParms(); openParms.DatabaseOnDevice = ".udb"; ULConnection.DatabaseManager.CreateDatabase( openParms.ToString(), "" ); ULConnection conn = new ULConnection( openParms.ToString() ); conn.Open();