OLE DB Programmer's Reference

What's New in OLE DB

The OLE DB documentation released with Microsoft® Data Access Components (MDAC) 2.6 includes a number of topics that have been changed, added, or deleted.

OLE DB Programmer's Reference

A new interface, IRowsetBookmark, has been introduced to set the next fetch position based on a bookmark.

Another new interface, ICommandStream, has been introduced to support issuing commands in a stream instead of as a text string. This interface is used in conjunction with the new properties, DBPROP_OUTPUTENCODING and DBPROP_OUTPUTSTREAM, to return query results in a stream. Providers, such as the OLE DB Provider for SQL Server, can use streams to return potentially sizable query results, such as rowsets encoded as XML data.

The OLE DB header, oledb.h, now defines certain data types as 64-bits long when the "/D_WIN64" compiler option is used. These 64-bit data types are used in conjunction with 64-bit processors and corresponding builds of OLE DB and the operating system. OLE DB samples should work properly for either 32-bit or 64-bit systems; however, samples are certified only for 32-bit systems.

The conceptual and reference material for change notifications has been clarified. Modifications have been made to Chapter 12: OLE DB Object Notifications and to the IRowsetNotify interface and its methods to clarify the interaction between phases, reasons for those phases, and changes to a rowset.

The OLE DB Glossary has been updated and edited. Terms not specific or central to an understanding of OLE DB have been removed. Terminology introduced in the conceptual matter now has a clearer definition in the glossary. Terms from OLE DB for OLAP have also been added.

To efficiently obtain information, or table statistics, that can be used to estimate the number and distribution of values in a query result, OLE DB introduces the TABLE_STATISTICS schema rowset, the DBPROP_TABLESTATISTICS property, a new bit in the DBPROP_OPENROWSETSUPPORT property, and a new histogram rowset returned by IOpenRowset::OpenRowset. A conceptual overview of these features and how to use them effectively is provided in the section "Special-Purpose Rowsets," in Chapter 1: Overview of OLE DB.

Other new OLE DB properties that have been defined and are described in Appendix C: OLE DB Properties. The following table provides a brief description of each.

Property Description
DBPROP_OUTPUTENCODING Specifies the encoding to be used in a returned stream
DBPROP_OUTPUTSTREAM Specifies the stream for which results should be returned
DBPROP_SKIPROWCOUNTRESULTS Requires a provider that supports multiple results to either return or skip control row count results
DBPROP_TABLESTATISTICS Indicates support for table statistics
DBPROP_OPENROWSETSUPPORT A new bit indicates whether the provider supports histogram rowsets.

OLE DB for OLAP

Added features expand the capabilities of the consumer (or client application) to view and analyze multidimensional data obtained through a multidimensional or tabular data provider.

Expanded Hierarchy Support

OLE DB for OLAP now supports unbalanced and network hierarchy types, along with balanced and ragged types. For more information, see "Supported Hierarchy Types" in Chapter 22: OLE DB for OLAP Concepts.

Dimension Write-Back

Dimension write-back provides a means for your application to add or remove members from a dimension to create "what-if" scenarios.

Annotations

The ANNOTATIONS column, a new optional column in the CUBES, DIMENSIONS, HIERARCHIES, and MEMBERS schema rowsets, provides a means to store and share comments on hierarchy members and cell values.

New Schema Rowsets

The following schema rowsets have been added to allow client applications to execute processes stored in the data cub, and to identify information pertinent to sets:

Additional and Modified Functions

Following is a summary of functions that have been added or changed in the MDAC 2.6 release for OLE DB for OLAP:

Function descriptions and examples can be found in the "Advanced MDX" section of Chapter 25: Multidimensional Expressions.

New User-Defined Functions

User-defined functions can now be used within MDX to operate on multidimensional data. These custom functions can be registered in your library and used by your application like any other function.

Properties

New OLE DB for OLAP properties have been defined and are described in Appendix C: Properties. The following table provides a brief description of these new (or modified) properties.

Property Description
MDPROP_VISUALMODE Defines visibility of precalculated totals
MDPROP_NAMED_LEVELS (Modified) Support for named levels

OLE DB Samples

The Rowset Viewer sample has been updated for the row object and direct binding interfaces. It also now handles multidimensional data functions for developers using OLE DB for OLAP.

The OLE DB Sample Provider sample has been moved here from Technical Articles.

The OLE DB Query Demo sample has been deleted from this release of MDAC.

OLE DB Test Tools

The Trace Provider tool has been removed from MDAC pending further development. It had been offered as a beta preview for MDAC 2.5.