Was this helpful?
IngresError Class
The IngresError class represents error or warning information returned by the Ingres database.
IngresError Class Declaration
The IngresError class can be declared as follows:
C#: [Serializable] public sealed class IngresError
VB.NET: NotInheritable Public Class IngresError
IngresError Class Example
The following is an implementation of the IngresError class:
static void PrintErrorCollection(IngresErrorCollection errcol)
{
    foreach(IngresError err in errcol)
    {
        PrintError(err);
    }
    Console.WriteLine("");
}
 
static void PrintError(IngresError err)
{
    Console.Write(err.GetType().ToString() + ":\n");
    Console.Write("\t" + "Message = " +
        (err.Message !=null?
            err.Message.ToString() :"<null>") + "\n");
    Console.Write("\t" + "Source = " +
        (err.Source!=null?err.Source.ToString():"<null>") + "\n");
    Console.Write("\t" + "ToString: " + err.ToString() + "\n");
    Console.Write("\t" + "Number = " +
        (err.Number.ToString()) + "\n");
    Console.Write("\t" + "SQLState = " +
        (err.SQLState !=null?
            err.SQLState.ToString() :"<null>") + "\n");
    Console.WriteLine("");
}
IngresError Class Properties
The IngresError class has the following properties:
Property
Accessor
Description
Message
get
A description of the error.
Number
get
The database-specific error integer information returned by the Ingres database.
Source
get
Name of the data provider that generated the error. Always “Ingres.”
SQLState
get
The standard five-character SQLSTATE code.
IngresError Class Public Methods
The public methods available to the IngresError class are:
Method
Description
ToString
A description of the error in the form of “IngresError: error-message-text”.
Last modified date: 01/30/2023