|
Oracle® Data Provider for .NET Developer's Guide
10g Release 1 (10.1.0.3) Part No. B14164-01 |
|
|
|
|
An OracleErrorCollection class represents a collection of all errors that are thrown by the Oracle Data Provider for .NET.
Class Inheritance
Object
ArrayList
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.
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
OracleErrorCollection members are listed in the following tables:
OracleErrorCollection Static Methods
OracleErrorCollection static methods are listed in Table 4-55.
Table 4-55 OracleErrorCollection Static Methods
| Methods | Description |
|---|---|
Equals
|
Inherited from Object (Overloaded)
|
OracleErrorCollection Properties
OracleErrorCollection properties are listed in Table 4-56.
Table 4-56 OracleErrorCollection Properties
| Name | Description |
|---|---|
Capacity
|
Inherited from ArrayList
|
Count
|
Inherited from ArrayList
|
IsReadOnly
|
Inherited from ArrayList
|
IsSynchronized
|
Inherited from ArrayList
|
Item
|
Inherited from ArrayList
|
OracleErrorCollection Public Methods
OracleErrorCollection public methods are listed in Table 4-57.
Table 4-57 OracleErrorCollection Public Methods
| Public Method | Description |
|---|---|
CopyTo
|
Inherited from ArrayList
|
Equals
|
Inherited from Object (Overloaded)
|
GetHashCode
|
Inherited from Object
|
GetType
|
Inherited from Object
|
ToString
|
Inherited from Object
|
OracleErrorCollection static methods are listed in Table 4-58.
Table 4-58 OracleErrorCollection Static Methods
| Methods | Description |
|---|---|
Equals
|
Inherited from Object (Overloaded)
|
OracleErrorCollection properties are listed in Table 4-59.
Table 4-59 OracleErrorCollection Properties
| Name | Description |
|---|---|
Capacity
|
Inherited from ArrayList
|
Count
|
Inherited from ArrayList
|
IsReadOnly
|
Inherited from ArrayList
|
IsSynchronized
|
Inherited from ArrayList
|
Item
|
Inherited from ArrayList
|
OracleErrorCollection public methods are listed in Table 4-60.