DropDatabase method

Deletes the specified database.

You cannot drop a database that has open connections.

Syntax
Visual Basic

Public Sub DropDatabase( _
   ByVal connString As String _
)
C#

public void DropDatabase(
   string  connString
);
Parameters
  • connString   The parameters for identifying a database in the form of a semicolon-separated list of keyword-value pairs. For more information, see ULConnectionParms class.

Example

The following code creates the database \UltraLite\MyDatabase.udb on a Windows Mobile device then opens a connection to it.

' Visual Basic
Dim connParms As ULConnectionParms = New ULConnectionParms
connParms.DatabaseOnCE = "\UltraLite\MyDatabase.udb"
ULConnection.DatabaseManager.DropDatabase( _
    connParms.ToString() _
  )
// C#
ULConnectionParms connParms = new ULConnectionParms();
connParms.DatabaseOnCE = @"\UltraLite\MyDatabase.udb";
ULConnection.DatabaseManager.DropDatabase(
    connParms.ToString()
  );
ULConnection conn = new ULConnection( openParms.ToString() );
conn.Open();
See also