ITableData::HrDeleteRows

The ITableData::HrDeleteRows method deletes multiple table rows.

Quick Info

See ITableData : IUnknownOOTYH1.

 

HRESULT HrDeleteRows(

    ULONG ulFlags,

 

    LPSRowSet lprowsetToDelete,

 

    ULONG FAR * cRowsDeleted

 

   )

 

 

Parameters

ulFlags

[in] Bitmask of flags that controls the deletion. The following flag can be set:

TAD_ALL_ROWS

Deletes all rows from the table and all corresponding views, sending a single TABLE_RELOAD notification.

lprowsetToDelete

[in] Pointer to a row set describing the rows to be deleted. The lprowsetToDelete parameter can be NULL if the TAD_ALL_ROWS flag is set in the ulFlags parameter.

cRowsDeleted

[out] Count of the deleted rows.

 

Return Values

S_OK

The table rows were successfully deleted.

 

Remarks

The ITableData::HrDeleteRows method locates and removes the table rows containing the columns that match the property pointed to by the lpProps member of each aRow entry in the row set. An index column is used to identity each row; this column must have the same property tag as the property tag passed in the ulPropTagIndexColumn parameter in the call to CreateTableYIFK6J.

The number of rows that were actually deleted is returned in cRowsDeleted. No error is returned if one or more rows could not be found.

After the rows are deleted, notifications are sent to all clients or service providers with a view of the table that have called the table s IMAPITable::Advise to register for notifications.

Deleting rows does not reduce the columns available to existing table views or subsequently opened table views, even if the rows deleted were the last with values for a specific column.

See Also

CreateTable, ITableData::HrDeleteRow, ITableData::HrModifyRows, SRowSet, TABLE_NOTIFICATION