Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
|
Applies To
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. |
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);