Skip Headers

Oracle Data Provider for .NET Developer's Guide
Release 9.2.0.2

Part Number A96160-01
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to beginning of chapter Go to next page

Oracle.DataAccess.Client Namespace, 7 of 26


OracleError Class

The OracleError class represents an error reported by Oracle.

Class Inheritance

Object

  OracleError

Declaration
// C#
public sealed class OracleError
Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.

Remarks

The OracleError class represents a warning or an error reported by Oracle.

Example
// C#
...
try {
    cmd.ExecuteNonQuery()
}
catch ( OracleException e ){
   OracleError err1 = e.Errors[0];
   OracleError err2 = e.Errors[1];

    Console.WriteLine("Error 1 Message:", err1.Message);
    Console.WriteLine("Error 2 Source:", err2.Source);
}
Requirements

Namespace: Oracle.DataAccess.Client

Assembly: Oracle.DataAccesss.dll

See Also:

OracleError Members

OracleError members are listed in the following tables:

OracleError Static Methods

OracleError static methods are listed in Table 4-50.

Table 4-50 OracleError Static Methods
Methods Description

Equals

Inherited from Object (Overloaded)

OracleError Methods

OracleError methods are listed in Table 4-51.

Table 4-51 OracleError Methods  
Methods Description

Equals

Inherited from Object (Overloaded)

GetHashCode

Inherited from Object

GetType

Inherited from Object

ToString

Returns a string representation of the OracleError

OracleError Properties

OracleError properties are listed in Table 4-52.

Table 4-52 OracleError Properties  
Properties Description

DataSource

Specifies the Oracle service name (TNS name) that identifies the Oracle database

Message

Specifies the message describing the error

Number

Specifies the Oracle error number

Procedure

Specifies the stored procedure that causes the error

Source

Specifies the name of the data provider that generates the error

OracleError methods are listed in Table 4-53.

Table 4-53 OracleError Methods  
Methods Description

Equals

Inherited from Object (Overloaded)

GetHashCode

Inherited from Object

GetType

Inherited from Object

ToString

Returns a string representation of the OracleError

See Also:

OracleError Static Methods

OracleError static methods are listed in Table 4-54.

Table 4-54 OracleError Static Methods
Methods Description

Equals

Inherited from Object (Overloaded)

See Also:

OracleError Properties

OracleError properties are listed in Table 4-55.

Table 4-55 OracleError Properties  
Properties Description

DataSource

Specifies the Oracle service name (TNS name) that identifies the Oracle database

Message

Specifies the message describing the error

Number

Specifies the Oracle error number

Procedure

Specifies the stored procedure that causes the error

Source

Specifies the name of the data provider that generates the error

See Also:

DataSource

This property specifies the Oracle service name (TNS name) that identifies the Oracle database.

Declaration
// C#
public string DataSource {get;}
Property Value

A string.

See Also:

Message

This property specifies the message describing the error.

Declaration
// C#
public string Message {get;}
Property Value

A string.

See Also:

Number

This property specifies the Oracle error number.

Declaration
// C#
public int Number {get;}
Property Value

An int.

See Also:

Procedure

This property specifies the stored procedure that causes the error.

Declaration
// C#
public string Procedure {get;}
Property Value

The stored procedure name.

Remarks

Represents the stored procedure which creates this OracleError object.

See Also:

Source

This property specifies the name of the data provider that generates the error.

Declaration
// C#
public string Source {get;}
Property Value

A string.

See Also:

OracleError Methods

OracleError methods are listed in Table 4-56.

Table 4-56 OracleError Methods  
Methods Description

Equals

Inherited from Object (Overloaded)

GetHashCode

Inherited from Object

GetType

Inherited from Object

ToString

Returns a string representation of the OracleError

See Also:

ToString

Overrides Object

This method returns a string representation of the OracleError.

Declaration
// C#
public override string ToString();
Return Value

Returns a string with the format Ora- error number: Class.Method name error message stack trace information.

Example

ORA-24333: zero iteration count

See Also:


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index