Mimer SQL Data Provider help
MimerException Class
Members  Example 




Mimer.Data.Client Namespace : MimerException Class
The exception that is generated when an error is returned by the Mimer Data Provider.
Object Model
MimerException Class
Syntax
'Declaration
 
Public NotInheritable Class MimerException 
   Inherits System.Data.Common.DbException
public sealed class MimerException : System.Data.Common.DbException 
public class MimerException = class(System.Data.Common.DbException)sealed; 
public sealed class MimerException extends System.Data.Common.DbException
public __gc __sealed class MimerException : public System.Data.Common.DbException 
Remarks
Typically the exceptions originate from the Mimer Database Server. The origin of the MimerException is returned in Source.
Example
The following table has a primary key constraint called PK1: CREATE TABLE TAB1(C1 INTEGER, C2 DATE, CONSTRAINT PK1 PRIMARY KEY(C1))

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.

MimerCommand command = new MimerCommand();
command.CommandText = "INSERT INTO TAB1 VALUES(1, DATE '2008-12-01')";
command.Connection = connection;
try {
    command.ExecuteNonQuery()
} catch (MimerException ex) {
    if (ex.Errors.Count > 0 && ex.Errors[0].ConstraintName == "PK1") {
        Console.WriteLine("Duplicate primary key");
    } else {
        Console.WriteLine("Error message: " + ex.Message);
    }
}
Dim command As New MimerCommand
command.CommandText = "INSERT INTO TAB1 VALUES(1, DATE '2008-12-01')"
command.Connection = connection
Try
    command.ExecuteNonQuery()
Catch ex As MimerException
    If ex.Errors.Count > 0 And ex.Errors(0).ConstraintName == "PK1" Then
        Console.WriteLine("Duplicate primary key")
    Else
        Console.WriteLine("Error message: " + ex.Message)
    End If
End Try
Inheritance Hierarchy

System.Object
   System.Exception
      System.SystemException
         System.Runtime.InteropServices.ExternalException
            System.Data.Common.DbException
               Mimer.Data.Client.MimerException

Requirements

.NET Framework
Version 2.0 or later

See Also

Reference

MimerException Members
Mimer.Data.Client Namespace