CRowset Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CRowset Class.

Encapsulates an OLE DB rowset object and several related interfaces and provides manipulation methods for rowset data.

template <class TAccessor = CAccessorBase>  
class CRowset  

Parameters

TAccessor
An accessor class. The default is CAccessorBase.

Methods

AddRefRowsIncrements the reference count associated with the current row.
CloseReleases rows and the current IRowset interface.
CompareCompares two bookmarks using IRowsetLocate::Compare.
CRowsetCreates a new CRowset object and (optionally) associates it with an IRowset interface supplied as a parameter.
DeleteDeletes rows from the rowset using IRowsetChange:DeleteRows.
FindNextRowFinds the next matching row after the specified bookmark.
GetApproximatePositionReturns the approximate position of a row corresponding to a bookmark.
GetDataRetrieves data from the rowset's copy of the row.
GetDataHereRetrieves data from the specified buffer.
GetOriginalDataRetrieves the data most recently fetched from or transmitted to the data source, ignoring pending changes.
GetRowStatusReturns the status of all rows.
InsertCreates and inserts a new row using IRowsetChange:InsertRow.
IsSameRowCompares the specified row with the current row.
MoveFirstRepositions the next-fetch location to the initial position.
MoveLastMoves to the last record.
MoveNextFetches data from the next sequential row or a specified number of positions beyond the next row.
MovePrevMoves to the previous record.
MoveToBookmarkFetches the row marked by a bookmark or the row at a specified offset from that bookmark.
MoveToRatioFetches rows starting from a fractional position in the rowset.
ReleaseRowsCalls IRowset::ReleaseRows to release the current row handle.
SetDataSets data values in one or more columns of a row using IRowsetChange:SetData.
UndoUndoes any changes made to a row since the last fetch or Update.
UpdateTransmits any pending changes made to the current row since the last fetch or update.
UpdateAllTransmits any pending changes made to all rows since the last fetch or update.

In OLE DB, a rowset is the object through which a program sets and retrieves data.

This class is not meant to be instantiated but rather passed as a template parameter to CTable or CCommand (CRowset is the default).

Header: atldbcli.h

DBViewer Sample
MultiRead Sample
MultiRead Attributes Sample
OLE DB Consumer Templates
OLE DB Consumer Templates Reference

Show: