| Oracle Data Provider for .NET Developer's Guide Release 9.2.0.2 Part Number A96160-01 |
|
Oracle.DataAccess.Client Namespace, 13 of 26
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.
Object
EventArgs
OracleInfoMessageEventArgs
// C# public sealed class OracleInfoMessageEventArgs
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
// 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(); ... }
Namespace: Oracle.DataAccess.Client
Assembly: Oracle.DataAccesss.dll
OracleInfoMessageEventArgs members are listed in the following tables:
The OracleInfoMessageEventArgs static methods are listed in Table 4-81.
| Methods | Description |
|---|---|
|
|
Inherited from |
The OracleInfoMessageEventArgs properties are listed in Table 4-82.
| Name | Description |
|---|---|
|
Specifies the collection of errors generated by the data source |
|
|
Specifies the error text generated by the data source |
|
|
Specifies the name of the object that generated the error |
The OracleInfoMessageEventArgs methods are listed in Table 4-83.
| Name | Description |
|---|---|
|
|
Inherited from |
|
|
Inherited from |
|
|
Inherited from |
|
|
Inherited from |
The OracleInfoMessageEventArgs static methods are listed in Table 4-84.
| Methods | Description |
|---|---|
|
|
Inherited from |
The OracleInfoMessageEventArgs properties are listed in Table 4-85.
| Name | Description |
|---|---|
|
Specifies the collection of errors generated by the data source |
|
|
Specifies the error text generated by the data source |
|
|
Specifies the name of the object that generated the error |
This property specifies the collection of errors generated by the data source.
// C# public OracleErrorCollection Errors {get;}
The collection of errors.
This property specifies the error text generated by the data source.
// C# public string Message {get;}
The error text.
This property specifies the name of the object that generated the error.
// C# public string Source {get;}
The object that generated the error.
The OracleInfoMessageEventArgs methods are listed in Table 4-86.
| Name | Description |
|---|---|
|
|
Inherited from |
|
|
Inherited from |
|
|
Inherited from |
|
|
Inherited from |
|
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|