Skip Headers

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

Part Number B10119-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

Open (OAdvise) Method

Applies To

OAdvise

Description

This method opens an OAdvise object, attaching it to a dynaset.

Usage

oresult Open(const ODynaset &odyn)

Arguments

odyn
An ODynaset to which you attach.
Remarks

This method attaches the advisory to the dynaset odyn. After this call, the dynaset of odyn delivers messages to this advisory.

It is legal to Open an already open OAdvise object. The object is closed and then opened again.

Note that the instances of the OAdvise class do nothing. You will want to subclass OAdvise to get behavior that you want.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE).

Example

Opening an OAdvise object:

// create a database

ODatabase odb("ExampleDB", "scott", "tiger");

// create a dynaset

ODynaset thedynaset(odb, "select * from emp");

// default constructor of OAdvise

OAdvise adv1;

// open that advisory, attaching it to dynaset

adv1.Open(thedynaset);