다음을 통해 공유


COleDBRecordView Class

A view that displays database records in controls.

class COleDBRecordView : public CFormView

Remarks

The view is a form view directly connected to a CRowset object. The view is created from a dialog template resource and displays the fields of the CRowset object in the dialog template's controls. The COleDBRecordView object uses dialog data exchange (DDX), and the navigational functionality built into CRowset, to automate the movement of data between the controls on the form and the fields of the rowset. COleDBRecordView also supplies a default implementation for moving to the first, next, previous, or last record and an interface for updating the record currently on view.

You can use DDX functions with COleDbRecordView to get data directly from the database recordset and display it in a dialog control. You should use the DDX_* methods (such as DDX_Text), not the DDX_Field* functions (such as DDX_FieldText) with COleDbRecordView. DDX_FieldText will not work with COleDbRecordView because DDX_FieldText takes an additional argument of type CRecordset* (for CRecordView) or CDaoRecordset* (for CDaoRecordView).

참고

If you are working with the Data Access Objects (DAO) classes rather than the OLE DB Consumer Template classes, use class CDaoRecordView instead. For more information, see the article Overview: Database Programming.

COleDBRecordView keeps track of the user's position in the rowset so that the record view can update the user interface. When the user moves to either end of the rowset, the record view disables user interface objects — such as menu items or toolbar buttons — for moving further in the same direction.

For more information about rowset classes, see the Using OLE DB Consumer Templates article.

Requirements

Header: afxoledb.h

See Also

Concepts

COleDBRecordView Members

Hierarchy Chart