Mimer SQL Data Provider help 11.0
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
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 
Typically the exceptions originate from the Mimer Database Server. The origin of the MimerException is returned in Source.
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 {
} 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
Catch ex As MimerException
    If ex.Errors.Count > 0 And ex.Errors(0).ConstraintName == "PK1" Then
        Console.WriteLine("Duplicate primary key")
        Console.WriteLine("Error message: " + ex.Message)
    End If
End Try
Inheritance Hierarchy



.NET Framework
Version 2.0 or later

See Also


MimerException Members
Mimer.Data.Client Namespace