Compartir a través de


CRowset::SetData

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

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

Parameters

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

Return Value

A standard HRESULT.

Remarks

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.

Requirements

Header: atldbcli.h

See Also

Reference

CRowset Class

CRowset::Update