Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Add (OraSubscriptions Collection)

See Also
Example


Applies To

OraSubscriptions Collection

Description

Adds a subscription to the OraSubscriptions collection.

Usage

orasubscriptions.Add Name, DbeventsHdl, Ctx

Arguments
Description
[in]Name
The Dbevent of interest. The appropriate event trigger and AQ queue must be set up prior to this.

Name here refers to the subscription name in the form of the string 'SCHEMA.QUEUE' if the registration is for a single consumer queue and 'SCHEMA.QUEUE:CONSUMER_NAME' if the registration is for a multiconsumer queue.

The Name string should be in uppercase.

[in] DbeventsHdl
The database event handler. An IDispatch interface implementing the NotifyDBEvents method which is invoked when the database event of interest is fired.

[in] Ctx
Context-specific information that the application wants passed to NotifyDbEvents when it is invoked.

Remarks

To register for subscription of a dbevent, the name identifying the subscription of interest and the dbevent handler that handles the event must be passed in when the Add method is called. The queues and event triggers necessary for supporting the database event must be set up before the subscriptions can be fired.

The dbevent handler should be an automation object that implements the method NotifyDBEvents. The NotifyDBEvents method is invoked by Oracle Objects for OLE when database events of interest are fired.

For more detailed information about setting up the queues and triggers for Oracle Database Events, refer to the Oracle Database Concepts, section on Triggers on System Events and User Events.

The syntax of the method is:

Public Function NotifyDBEvents(ByVal Ctx As Variant, ByVal Payload As

Variant

Variant
Description
[in] Ctx
Passed into OraSubscriptions.Add method by the application. Context-sensitive information that the application wants passed on to the dbevent handler.

[in] Payload
The payload for this notification. Dbevents are fired by setting up event trigger and queues. Payload here refers to the payload, if any that was enqueued in the queue when the event triggered.