SqlCeEngine Constructor (String)
Initializes a new instance of the SqlCeEngine class with the specified local connection string.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
Syntax
'Declaration
Public Sub New ( _
connectionString As String _
)
'Usage
Dim connectionString As String
Dim instance As New SqlCeEngine(connectionString)
public SqlCeEngine(
string connectionString
)
public:
SqlCeEngine(
String^ connectionString
)
new :
connectionString:string -> SqlCeEngine
public function SqlCeEngine(
connectionString : String
)
Parameters
- connectionString
Type: System.String
Examples
The following sample demonstrates how to create a new SQL Server Compact database.
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();