| Oracle® Data Provider for .NET Developer's Guide 11g Release 1 (11.1.0.6.20) Part Number E10927-01  | 
  | 
  | 
View PDF | 
An OracleErrorCollection class represents a collection of all errors that are thrown by the Oracle Data Provider for .NET.
Class Inheritance
System.Object
  System.ArrayList
    Oracle.DataAccess.Client.OracleErrorCollection
Declaration
// C# public sealed class OracleErrorCollection : ArrayList
Thread Safety
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
Remarks
A simple ArrayList that holds a list of OracleErrors.
If there are multiple errors, ODP.NET only returns the first error message on the stack.
Example
// C#
 
using System;
using System.Data;
using Oracle.DataAccess.Client;
 
class OracleErrorCollectionSample
{
  static void Main()
  {
    string constr = "User Id=scott;Password=tiger;Data Source=oracle";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
 
    // Create an OracleCommand object using the connection object
    OracleCommand cmd = con.CreateCommand();
 
    try
    {
      cmd.CommandText = "insert into notable values (99, 'MyText')";
      cmd.ExecuteNonQuery();
    }
    catch (OracleException ex)
    {
      Console.WriteLine("Record is not inserted into the database table.");
 
      foreach (OracleError error in ex.Errors) 
      {
        Console.WriteLine("Error Message: " + error.Message);
        Console.WriteLine("Error Source: " + error.Source);         
      }
    }
  }
}
Requirements
Namespace: Oracle.DataAccess.Client
Assembly: Oracle.DataAccess.dll
Microsoft .NET Framework Version: 1.0 or later
See Also:
OracleErrorCollection members are listed in the following tables.
OracleErrorCollection Static Methods
OracleErrorCollection static methods are listed in Table 5-51.
Table 5-51 OracleErrorCollection Static Methods
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
OracleErrorCollection Properties
OracleErrorCollection properties are listed in Table 5-52.
Table 5-52 OracleErrorCollection Properties
| Property | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
OracleErrorCollection Public Methods
OracleErrorCollection public methods are listed in Table 5-53.
Table 5-53 OracleErrorCollection Public Methods
| Public Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
The OracleErrorCollection static method is listed in Table 5-54.
Table 5-54 OracleErrorCollection Static Method
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
See Also:
OracleErrorCollection properties are listed in Table 5-55.
Table 5-55 OracleErrorCollection Properties
| Property | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
See Also:
OracleErrorCollection public methods are listed in Table 5-56.