Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 1 (10.1) Part Number B10119-01 |
|
Applies To
Description
The ActionNotify method is called by a dynaset when that dynaset has performed an operation. You do not call ActionNotify; the ActionNotify method of your OAdvise subclass is called by the dynaset.
Usage
void ActionNotify(int actiontype)
Arguments
actiontype
actiontype will have one of the following values:
Actiontype Value |
Description |
---|---|
OADVISE_MOVE_FIRST |
// dynaset moving to first record |
OADVISE_MOVE_PREV |
// dynaset moving to previous record |
OADVISE_MOVE_NEXT |
// dynaset moving to next record |
OADVISE_MOVE_LAST |
// dynaset moving to last record |
OADVISE_MOVE_TOMARK |
// dynaset moving to dynaset mark |
OADVISE_REFRESH |
// dynaset refreshing |
OADVISE_DELETE |
// dynaset deleting current record |
OADVISE_ADDNEW |
// dynaset adding a new record |
OADVISE_UPDATE |
// dynaset updating |
OADVISE_ROLLBACK |
// session (that dynaset is part of) is rolling back |
When you subclass OAdvise, you can override the ActionNotify method. After an instance of your OAdvise subclass is attached to a dynaset (by way of the OAdvise::Open method) your instance receives calls to its ActionNotify method. Use an ActionNotify method to perform processing after a dynaset has performed an action.
The unoverridden ActionNotify method of OAdvise does nothing.
Example
This example puts up a notification dialog whenever a record is updated.
void YourOAdvise::ActionNotify(int actiontype)
{
if (actiontype == OADVISE_UPDATE)
{
NotifyDialog("Record has been updated");
}
return;
}