다음을 통해 공유


CRowset::SetData

 

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::SetData.

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

Syntax

  
      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

CRowset Class
CRowset::Update