Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Changed Method

Applies To

OBound

OBinder

Description

This method tells the object that the value for the current record has (or has not) been changed. Normally only OBound or OBinder subclasses call this method.

Usage

oresult Changed(oboolean changed = TRUE)

Arguments

changed
If TRUE (the default), tells the object that it has been changed
If FALSE, tells the object that it has not been changed (rarely used)
Remarks

When you subclass OBound and OBinder, you generally create objects that allow field values to be edited in some convenient fashion. In order for OBinder and OBound to know when to update the database with edited field values, they need to know when values have been changed. Calling this method is how you inform OBinder and OBound objects that a change has occurred.

Normally the OBound subclass calls Changed in some routine that notices that the value has been changed. For example, where the OBound subclass is a text editing control, Changed should be called when the user enters a key in the control. Users of OBound and OBinder classes and subclasses normally do not call Changed.

Calling Changed on an OBound means that the field value of that OBound has been changed in the current record. Calling Changed on an OBinder means that the current record has been changed.

Marking an OBound as changed means that eventually the OBound's SaveChange method will be called to save the change to the database.

The first time that something in the current record is marked as changed, either some OBound in the record or the whole record, StartEdit is called on the dynaset being managed by the OBinder. This can fail, for all the reasons StartEdit might fail.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE). Failure typically means that the dynaset that OBinder is managing is not updatable.

Example

Please see the Workbook for the example "OBound of a variable." That example works through the implementation of a subclass of OBound. That subclass calls Changed.


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback