CRecordset::RefreshRowset

Updates the data and the status for a row in the current rowset.

void RefreshRowset(
   WORD wRow,
   WORD wLockType = SQL_LOCK_NO_CHANGE 
);

Parameters

  • wRow
    The one-based position of a row in the current rowset. This value can range from zero to the size of the rowset.

  • wLockType
    A value indicating how to lock the row after it has been refreshed. For details, see Remarks.

Remarks

If you pass a value of zero for wRow, then every row in the rowset will be refreshed.

To use RefreshRowset, you must have implemented bulk row fetching by specifying the CRecordset::useMulitRowFetch option in the Open member function.

RefreshRowset calls the ODBC API function SQLSetPos. The wLockType parameter specifies the lock state of the row after SQLSetPos has executed. The following table describes the possible values for wLockType.

wLockType

Description

SQL_LOCK_NO_CHANGE (the default value)

The driver or data source ensures that the row is in the same locked or unlocked state as it was before RefreshRowset was called.

SQL_LOCK_EXCLUSIVE

The driver or data source locks the row exclusively. Not all data sources support this type of lock.

SQL_LOCK_UNLOCK

The driver or data source unlocks the row. Not all data sources support this type of lock.

For more information about SQLSetPos, see the Windows SDK. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).

Requirements

Header: afxdb.h

See Also

Reference

CRecordset Class

Hierarchy Chart

CRecordset::SetRowsetCursorPosition

CRecordset::SetRowsetSize

Other Resources

CRecordset Members