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

OBound

You use OBound objects in conjunction with an instance of the OBinder class. (See the description of the OBinder class for details on how these two classes are used, including discussion of the trigger methods.)

OBound is an abstract class; you never declare any instances of it. This release contains a set of OBound subclasses that implements data-aware user interface widgets. You can subclass those subclasses, or you can subclass OBound directly to implement other bound objects. The Workbook contains examples of creating OBound subclasses, and how to use the provided subclasses.

OBound subclasses must implement two methods: Refresh and SaveChange. The Refresh method transfers a value from the dynaset to the OBound instance. It is called, for example, whenever the dynaset navigates to a new record. The SaveChange method is called when it is time to set the value in the Oracle database, for example, after a change has been made and the dynaset is trying to move to a different record. It is usually implemented using the SetValue method of OBound.

OBound subclasses may also override the default triggers. If you do this, you should know that the overloaded trigger you write should call the default trigger in the OBound class. This will cause the bound object to be refreshed (have its value updated) when the database record is altered. Alternatively, the overloaded PostAdd, PostMove, PostRollback and PostQuery triggers can call RefreshBound() directly. In either case, the Refresh method you wrote above is called to refresh the bound control.

OBound instances generally allow some form of editing of the data that they contain. When a change is made, the OBound instance must call the Changed method to inform the OBinder/OBound bookkeeping machinery that the object has been changed.

The OBound class supports the following methods:

Construction and destruction:

OBound

~OBound

operator=

Attributes:

operator==
operator!=
Changed
IsChanged
IsOpen
Operations:

BindToBinder
Close
GetDatabase
GetDynaset
GetName
GetValue
Refresh
SaveChange
SetValue
Unbind
Triggers:

PostAdd
PostDelete
PostMove
PostQuery
PostRollback
PostUpdate
PreAdd
PreDelete
PreMove
PreQuery
PreRollback
PreUpdate
Shutdown
Startup
Error Handling:

ErrorNumber

ErrorReset

GetErrorText

LookupErrorText


 
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