Поделиться через


CRowset::SetData

Sets data values in one or more columns of a row.

HRESULT SetData( ) const throw( ); 
HRESULT SetData(
   int nAccessor 
) const throw( );

Параметры

  • nAccessor
    [in] The number of the accessor to use for accessing the data.

Возвращаемое значение

A standard HRESULT.

Заметки

For the SetData form that accepts no arguments, all accessors are used for updating. You typically call SetData to set data values in columns in a row, then call Update to transmit those changes.

This method requires the optional interface IRowsetChange, which might not be supported on all providers; if this is the case, the method returns E_NOINTERFACE. You must also set DBPROP_IRowsetChange to VARIANT_TRUE before calling Open on the table or command containing the rowset.

The setting operation might fail if one or more columns is not writable. Modify your cursor map to correct this.

Требования

Header: atldbcli.h

См. также

Основные понятия

CRowset Class

CRowset Members

CRowset::Update