Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Initializes a new instance of the SqlCeConnection class.
Overload List
Initializes a new instance of the SqlCeConnection class.
Supported only by the .NET Compact Framework.
[Visual Basic] Public Sub New()
[JScript] public function SqlCeConnection();
Initializes a new instance of the SqlCeConnection class with the specified connection string.
Supported only by the .NET Compact Framework.
[Visual Basic] Public Sub New(String)
[JScript] public function SqlCeConnection(String);
Example
[Visual Basic, C#] The following example creates and opens a SqlCeConnection.
[Visual Basic, C#] Note This example shows how to use one of the overloaded versions of the SqlCeConnection constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic]
Dim conn As New SqlCeConnection()
conn.ConnectionString = "Persist Security Info=False; Data Source = Northwind.sdf;" + _
"Password = <password>; server=mySQLServer;Connect Timeout=30"
conn.Open()
[C#]
SqlCeConnection conn = new SqlCeConnection();
conn.ConnectionString = "Persist Security Info=False; Data Source = Northwind.sdf;" +
"Password = <password>; server=mySQLServer;Connect Timeout=30";
conn.Open();
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
See Also
SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.