SqlCeEngine-Konstruktor
Initialisiert eine neue Instanz der SqlCeEngine-Klasse.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
Syntax
'Declaration
<SecurityTreatAsSafeAttribute> _
<SecurityCriticalAttribute> _
Public Sub New
'Usage
Dim instance As New SqlCeEngine()
[SecurityTreatAsSafeAttribute]
[SecurityCriticalAttribute]
public SqlCeEngine()
[SecurityTreatAsSafeAttribute]
[SecurityCriticalAttribute]
public:
SqlCeEngine()
[<SecurityTreatAsSafeAttribute>]
[<SecurityCriticalAttribute>]
new : unit -> SqlCeEngine
public function SqlCeEngine()
Beispiele
Das folgende Beispiel veranschaulicht das Erstellen einer neuen SQL Server Compact-Datenbank.
File.Delete("Test.sdf")
Dim connString As String = "Data Source='Test.sdf'; LCID=1033; Password=""s$;2'!dS64""; Encrypt = TRUE;"
Dim engine As New SqlCeEngine(connString)
engine.CreateDatabase()
File.Delete("Test.sdf");
string connString = "Data Source='Test.sdf'; LCID=1033; Password=\"s$;2'!dS64\"; Encrypt = TRUE;";
SqlCeEngine engine = new SqlCeEngine(connString);
engine.CreateDatabase();