Mimer SQL Data Provider help
MimerConnection Class
Members  Example 




Mimer.Data.Client Namespace : MimerConnection Class
This class is used to connect and disconnect from a database server.
Object Model
MimerConnection Class
Syntax
'Declaration
 
Public NotInheritable Class MimerConnection 
   Inherits System.Data.Common.DbConnection
public sealed class MimerConnection : System.Data.Common.DbConnection 
public class MimerConnection = class(System.Data.Common.DbConnection)sealed; 
public sealed class MimerConnection extends System.Data.Common.DbConnection
public __gc __sealed class MimerConnection : public System.Data.Common.DbConnection 
Remarks
To open a connection to a database server, create an instance of the MimerConnection class, set the ConnectionString and then call the Open method. Make sure you explicitly Close the connection before the MimerConnection object goes out of scope. Otherwise there will be open connections in the database server until the object is garbage collected.
Example

No example is available for C++, JScript or Visual Basic. 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 the database server ExampleDB on the same node (local) as the client
// 
connection.ConnectionString = "Database=ExampleDB;Protocol=local;User Id=MIMER_STORE;Password=GoodiesAreUs";
try {
    connection.Open();
    // 
    //  Insert a row into the table TABLE23
    // 
    MimerCommand command = new MimerCommand("INSERT INTO TABLE23 VALUES('123',10)", connection);
    command.ExecuteNonQuery();
} finally {
    if (connection.State != ConnectionState.Closed) {
        connection.Close();
    }
}
Dim connection As New MimerConnection
'
'  Open a connection to the database server ExampleDB on the same node (local) as the client
'
connection.ConnectionString = "Database=ExampleDB;Protocol=local;User Id=MIMER_STORE;Password=GoodiesAreUs"
Try
    connection.Open()
    '
    '  Insert a row into the table TABLE23
    '
    Dim command As New MimerCommand("INSERT INTO TABLE23 VALUES('123',10)", connection)
    command.ExecuteNonQuery()
Finally 
    If Not connection.State = ConnectionState.Closed Then
        connection.Close()
    End If
End Try
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Data.Common.DbConnection
            Mimer.Data.Client.MimerConnection

Requirements

.NET Framework
Version 2.0 or later

See Also

Reference

MimerConnection Members
Mimer.Data.Client Namespace