CSimpleRow Class
Provides a default implementation for the row handle, which is used in the IRowsetImpl class.
Syntax
class CSimpleRow
Requirements
Header: atldb.h
Members
Methods
Name | Description |
---|---|
AddRefRow | Adds a reference count to an existing row handle. |
Compare | Compares two rows to see if they refer to the same row instance. |
CSimpleRow | The constructor. |
ReleaseRow | Releases rows. |
Data Members
Name | Description |
---|---|
m_dwRef | Reference count to an existing row handle. |
m_iRowset | An index to the rowset representing the cursor. |
Remarks
A row handle is logically a unique tag for a result row. IRowsetImpl
creates a new CSimpleRow
for every row requested in IRowsetImpl::GetNextRows. CSimpleRow
can also be replaced with your own implementation of the row handle, as it is a default template argument to IRowsetImpl
. The only requirement to replacing this class is to have the replacement class provide a constructor that accepts a single parameter of type LONG.
CSimpleRow::AddRefRow
Adds a reference count to an existing row handle in a thread-safe manner.
Syntax
DWORD AddRefRow();
CSimpleRow::Compare
Compares two rows to see if they refer to the same row instance.
Syntax
HRESULT Compare(CSimpleRow* pRow);
Parameters
pRow
A pointer to a CSimpleRow
object.
Return Value
An HRESULT value, usually S_OK, indicating the two rows are the same row instance, or S_FALSE, indicating the two rows are different. See IRowsetIdentity::IsSameRow in the OLE DB Programmer's Reference for other possible return values.
CSimpleRow::CSimpleRow
The constructor.
Syntax
CSimpleRow(DBCOUNTITEM iRowsetCur);
Parameters
iRowsetCur
[in] Index to the current rowset.
Remarks
Sets m_iRowset to iRowsetCur.
CSimpleRow::ReleaseRow
Releases rows in a thread-safe manner.
Syntax
DWORD ReleaseRow();
CSimpleRow::m_dwRef
Reference count to an existing row handle.
Syntax
DWORD m_dwRef;
CSimpleRow::m_iRowset
Index to the rowset representing the cursor.
Syntax
KeyType m_iRowset;
See also
OLE DB Provider Templates
OLE DB Provider Template Architecture
IRowsetImpl Class