Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Löscht die angegebene Datenbank
Public Shared Sub DropDatabase(ByVal connString As String)
public static void DropDatabase(string connString)
connString Die Parameter zum Identifizieren einer Datenbank in Form einer durch Semikolons getrennten Liste von Schlüsselwort-Wert-Paaren.
ULException-Klasse Es ist ein SQL-Fehler aufgetreten.
Sie können keine Datenbank löschen, die offene Verbindungen hat.
Der folgende Code erstellt die Datenbank \UltraLite\MyDatabase.udb auf einem Windows Mobile-Gerät und und öffnet dann eine Verbindung zu ihr.
' Visual Basic Dim connParms As ULConnectionParms = New ULConnectionParms connParms.DatabaseOnDevice = "\UltraLite\MyDatabase.udb" ULConnection.DatabaseManager.DropDatabase( _ connParms.ToString() _ )
Dies entspricht dem folgenden Code in der Sprache C#:
// C# ULConnectionParms connParms = new ULConnectionParms(); connParms.DatabaseOnDevice = ".udb"; ULConnection.DatabaseManager.DropDatabase( connParms.ToString() ); ULConnection conn = new ULConnection( openParms.ToString() ); conn.Open();