'Declaration
Public Overrides NotOverridable Sub Open()
public override void Open()
public procedure Open(); override;
public override function Open();
public: void Open(); override
'Declaration
Public Overrides NotOverridable Sub Open()
public override void Open()
public procedure Open(); override;
public override function Open();
public: void Open(); override
Exception | Description |
---|---|
System.InvalidOperationException |
|
System.ArgumentException |
|
MimerException | Error when setting up connection to database server or during initial communication. |
If a System.Transactions.TransactionScope is active the Mimer SQL Data Provider will automatically enlist in the transaction unless explicitly disabled with the enlist-option in the ConnectionString.
No example is available for C++ or JScript. To view a C# example, click the Language Filter button in the upper-left corner of the page.
MimerConnection connection = new MimerConnection(); // // Open a connection to node DbNode accessing database server ExampleDB // connection.ConnectionString = "Database=ExampleDB;protocol=tcp;node=DbNode;user id=SYSADM;password=syspass"; try { connection.Open(); // // Do useful work... // } finally { if (connection.State != ConnectionState.Closed) { connection.Close(); } }
Dim connection As New MimerConnection ' ' Open a connection to node DbNode accessing database server ExampleDB ' connection.ConnectionString = "Database=ExampleDB;protocol=tcp;node=DbNode;user id=SYSADM;password=syspass" Try connection.Open() ' ' Do useful work... ' Finally If Not connection.State = ConnectionState.Closed Then connection.Close() End If End Try
.NET Framework
Version 2.0 or later