Appearance of NULLs in a Flattened Rowset

OLE DB Programmer's Reference

NULLs appear in the flattened rowset in two different situations:

  • To indicate that a member is not present on the axis—for example, in column 2 of rows 4 and 5 of the flattened dataset diagrammed in the complex flattened rowset example. In the dataset, "Months" for Qtr3 and Qtr4 are not on the axis.
  • To indicate that a cell is empty. For example, the flattened dataset diagrammed in the DIMENSION PROPERTIES example has NULLs in the last column of the first row. This is because Venkatrao did not have any sales of Microsoft Excel in the USA for the first quarter of 1991. The corresponding cell in the dataset is empty.

When a consumer calls IRowset::GetData, DBSTATUS_ISNULL is returned. DBSTATUS_ISNULL is one of the status codes defined in OLE DB. An application allocates a buffer, and for each column it requests, it has space to hold the following information:

  • The actual data value (called the VALUE part).
  • The status after fetch, such as NULL indication or truncation indication (called the STATUS part).
  • The number of bytes of data fetched for variable-length data (called the LENGTH part).

DBSTATUS_ISNULL is written into the STATUS part of the consumer's buffer. When this status occurs, the VALUE part is meaningless.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net