The OracleNotificationEventArgs
class provides event data for a notification.
System.Object
System.EventArgs
Oracle.DataAccess.Client.OracleNotificationEventArgs
// C# public sealed class OracleNotificationEventArgs
Provider | ODP.NET, Unmanaged Driver | ODP.NET, Managed Driver |
Assembly | Oracle.DataAccess.dll |
Oracle.ManagedDataAccess.dll |
Namespace | Oracle.DataAccess.Client |
Oracle.ManagedDataAccess.Client |
.NET Framework | 3.5, 4.0, 4.5 | 4.0, 4.5 |
Not supported in a .NET stored procedure
All public static methods are thread-safe, although methods do not guarantee thread safety.
See Also:
OracleNotificationEventArgs
members are listed in the following tables.
OracleNotificationEventArgs Static Fields
The OracleNotificationEventArgs
static field is listed in Table 9-18.
Table 9-18 OracleNotificationEventArgs Static Field
Static Field | Description |
---|---|
|
Inherited from |
OracleNotificationEventArgs Static Methods
The OracleNotificationEventArgs
static method is listed in Table 9-19.
Table 9-19 OracleNotificationEventArgs Static Method
Static Method | Description |
---|---|
|
Inherited from |
OracleNotificationEventArgs Properties
OracleNotificationEventArgs
properties are listed in Table 9-20.
Table 9-20 OracleNotificationEventArgs Properties
Properties | Description |
---|---|
Contains detailed information about the current notification |
|
Indicates the database events for the notification |
|
Indicates the database resources related to the current notification |
|
Returns the database event source for the notification |
|
Returns the database event type for the notification |
OracleNotificationEventArgs Methods
OracleNotificationEventArgs
methods are listed in Table 9-21.
The OracleNotificationEventArgs
static field is listed in Table 9-22.
The OracleNotificationEventArgs
static method is listed in Table 9-23.
OracleNotificationEventArgs
properties are listed in Table 9-24.
Table 9-24 OracleNotificationEventArgs Properties
Properties | Description |
---|---|
Contains detailed information about the current notification |
|
Indicates the database events for the notification |
|
Indicates the database resources related to the current notification |
|
Returns the database event source for the notification |
|
Returns the database event type for the notification |
See Also:
This property contains detailed information about the current notification.
// C# Public DataTable Details{get;}
A DataTable
instance that contains detailed information about the current notification.
The returned DataTable
object contains column data about the current notification in order as shown in Table 9-25.
Table 9-25 DataTable Object Column Data
Name | Type | Description |
---|---|---|
|
|
The resource name of the invalidated object in the format < |
|
|
The information about the database event that occurs on a resource |
|
|
The rowid for the invalidated table row |
|
|
The |
The QueryId
column contains the CHANGE_NOTIFICATION_QUERY_ID
that corresponds to the pseudo-column that may have been retrieved by a SELECT statement at the time of the query-based notification. Also, the OracleDependency
object maintains all the CHANGE_NOTIFICATION_QUERY_ID
s that are registered with it.
For Continuous Query Notification:
The Details
property indicates changes for each invalidated object in the notification in the data table.
If ROWID
information is requested, then the ROWID
information is populated into the Rowid
column. However, if many rows are modified in a table, then the whole table is invalidated, and ROWID
information is not provided. Therefore, the Rowid
column contains all Null
values.
If the database event is related to a DDL change of the table or a table drop, then the Rowid
column is set to Null
.
This property indicates the database events for the notification.
// C# public OracleNotificationInfo Info{get;}
An OracleNotificationInfo
value that indicates the database event for the notification.
The OracleNotificationInfo
value is an enumeration type. If several events are received from the invalidation message, the Info
property is set to one of the OracleNotificationInfo
enumeration values associated with the database events. For example, if a table has been altered and a new row has been inserted into another table, the Info
property is set to either OracleNotificationInfo.Alter
ed or OracleNotificationInfo.Insert
.
To obtain more detailed information from the invalidation message, use the Details
and the ResourceNames
properties.
This property indicates the database resources related to the current notification.
// C# public string[] ResourceNames{get;}
A string array that indicates the database resources related to the current notification.
For Continuous Query Notification, the ResourceNames
property contains information about the invalidated object names in the format <schema_name
>.<object
_name
>. To obtain more detailed information about the changes for invalidated objects, use the Details
property.
This property returns the database event source for the notification.
// C# public OracleNotificationSource Source{get;}
The OracleNotificationSource
value for the notification.
The OracleNotificationSource
value is an enumeration type. If several event sources are received from the notification message, the Source
property is set to one of the OracleNotificationSource
enumeration values related to the database event source. For example, if a table has been altered (by the ALTER
TABLE
command) and a new row has been inserted into the same table, the Source
property is set to either OracleNotificationSource.Object
or OracleNotificationSource.Data
.
For Continuous Query Notification:
When the Source
property is set to OracleNotificationSource.Data
:
The Info
property is set to one of the following:
OracleNotificationInfo.Insert
OracleNotificationInfo.Delete
OracleNotificationInfo.Update
The ResourceNames
property is set, and the elements are set to the invalidated object names.
The Details
property contains detailed information on the change of each invalidated table.
When the Source
property is set to OracleNotificationSource.Database
:
The Info
property is set to one of the following:
OracleNotificationInfo.Startup
OracleNotificationInfo.Shutdown
OracleNotificationInfo.Shutdown_Any
OracleNotificationInfo.Dropped
When the Source
property is set to OracleNotificationSource.Object
:
The Info
property is set to either OracleNotificationInfo.Altered
or OracleNotificationInfo.Dropped
.
The ResourceNames
property is set, and the array elements of the ResourceNames
property are set to the object names that have been altered or dropped.
The Details
property contains detailed information on the changes of the object.
When the Source
property is set to OracleNotificationSource.Subscription
:
The Info
property is set to the following:
OracleNotificationInfo.End
This property returns the database event type for the notification.
// C# public OracleNotificationType Type{get;}
An OracleNotificationType
enumeration value that represents the type of the database event notification.
The OracleNotificationType
value is an enumeration type. If several event types are received from the notification message, then the Type
property is set to one of the OracleNotificationType
enumeration values related to the database event type.
OracleNotificationEventArgs
methods are listed in Table 9-26.