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, 13 of 26


OracleInfoMessageEventArgs Class

The OracleInfoMessageEventArgs class provides event data for the OracleConnection.InfoMessage event. When any warning occurs in the database, the OracleConnection.InfoMessage event is triggered along with the OracleInfoMessageEventArgs object that stores the event data.

Class Inheritance

Object

  EventArgs

    OracleInfoMessageEventArgs

Declaration
// C#
public sealed class OracleInfoMessageEventArgs
Thread Safety

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

Example
// C#
public void WarningHandler(object src, OracleInfoMessageEventArgs args)
    {
      LogOutput("Source object is: " + src.GetType().Name);
      LogOutput("InfoMessageArgs.Message is " + args.Message);
      LogOutput("InfoMessageArgs.Errors is " + args.Errors);
      LogOutput("InfoMessageArgs.Source is " + args.Source);
    }

    public bool MyFunc()
    {
      ...
      con.Open();
      OracleCommand cmd = Con.CreateCommand();

      //Register to the InfoMessageHandler
      cmd.Connection.InfoMessage +=
        new OracleInfoMessageEventHandler(WarningHandler);

      cmd.CommandText = CmdStr;
      cmd.CommandType = CommandType.Text;
      //If CmdStr causes warning(s), it will be handled.
      cmd.ExecuteNonQuery();
      ...
    }

Requirements

Namespace: Oracle.DataAccess.Client

Assembly: Oracle.DataAccesss.dll

See Also:

OracleInfoMessageEventArgs Members

OracleInfoMessageEventArgs members are listed in the following tables:

OracleInfoMessageEventArgs Static Methods

The OracleInfoMessageEventArgs static methods are listed in Table 4-81.

Table 4-81 OracleInfoMessageEventArgs Static Methods
Methods Description

Equals

Inherited from Object (Overloaded)

OracleInfoMessageEventArgs Properties

The OracleInfoMessageEventArgs properties are listed in Table 4-82.

Table 4-82 OracleInfoMessageEventArgs Properties  
Name Description

Errrors

Specifies the collection of errors generated by the data source

Message

Specifies the error text generated by the data source

Source

Specifies the name of the object that generated the error

OracleInfoMessageEventArgs Public Methods

The OracleInfoMessageEventArgs methods are listed in Table 4-83.

Table 4-83 OracleInfoMessageEventArgs Public Methods  
Name Description

Equals

Inherited from Object (Overloaded)

GetHashCode

Inherited from Object

GetType

Inherited from Object

ToString

Inherited from Object

See Also:

OracleInfoMessageEventArgs Static Methods

The OracleInfoMessageEventArgs static methods are listed in Table 4-84.

Table 4-84 OracleInfoMessageEventArgs Static Methods
Methods Description

Equals

Inherited from Object (Overloaded)

See Also:

OracleInfoMessageEventArgs Properties

The OracleInfoMessageEventArgs properties are listed in Table 4-85.

Table 4-85 OracleInfoMessageEventArgs Properties  
Name Description

Errrors

Specifies the collection of errors generated by the data source

Message

Specifies the error text generated by the data source

Source

Specifies the name of the object that generated the error

See Also:

Errrors

This property specifies the collection of errors generated by the data source.

Declaration
// C#
public OracleErrorCollection Errors {get;}
Property Value

The collection of errors.

See Also:

Message

This property specifies the error text generated by the data source.

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

The error text.

See Also:

Source

This property specifies the name of the object that generated the error.

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

The object that generated the error.

See Also:

OracleInfoMessageEventArgs Public Methods

The OracleInfoMessageEventArgs methods are listed in Table 4-86.

Table 4-86 OracleInfoMessageEventArgs Public Methods  
Name Description

Equals

Inherited from Object (Overloaded)

GetHashCode

Inherited from Object

GetType

Inherited from Object

ToString

Inherited from Object

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