Updating Cell Data

Unless one or more of the coordinates of a cell in a dataset is a calculated member, the cell is a point in the n-dimensional manifold represented by the cube. Therefore, updating cells in a dataset is tantamount to updating cube data. By using OLE DB for OLAP, cell data in a cube can be updated by providing methods for updating the cells of a dataset.

Updating is accomplished by using the range rowset. The consumer can update this rowset by using the IRowsetChange interface — just like any other OLE DB rowset.

Note the following rules:

  1. The CELL_ORDINAL column is always read-only.

  2. The other columns may or may not be read-only, based on provider-defined conditions. If the range rowset can be updated (that is, if it supports the IRowsetChange interface), usually at least one column, frequently the VALUE column, can be updated. Providers usually support the updating of other columns as well. Consumers must check dwFlags in the DBCOLUMNSINFO structure for the column to determine if a column can be updated.

  3. If one or more coordinates of a cell contains a calculated member, the semantics of deleting and updating the corresponding row in the range rowset are provider-specific. Typically, this results in DB_S_ERRORSOCCURRED or DB_E_ERRORSOCCURRED.

  4. If a cell corresponds to an aggregation, the corresponding row in the range rowset may or may not be updatable, depending on the capabilities of the provider. See “Updating Aggregate Cells” in this chapter. Whether it can be deleted is provider-specific.