Delimited Identifiers Returned from the Provider

OLE DB Programmer's Reference

When the consumer inputs a query string or schema rowset restriction, identifiers need to be quoted. However, there are occasions when a provider returns delimited identifiers, which could be the same quotation marks.

Consumers frequently use the information returned from schema rowsets to formulate a query. For example, the consumer user interface might allow a user to select a set of displayed members and drop them onto an axis of a dataset. When displaying the members, MEMBER_CAPTION is used. The act of dropping the set of members onto an axis triggers a routine in the consumer that formulates an axis specification. Here it will use the MEMBER_UNIQUE_NAME column from the MEMBERS rowset. As discussed in the section "Namespace and Unique Names," one possible way a provider can generate a unique name is by constructing it out of various component names, using a period (.) as the separator between these component names. Such providers should make sure that each component is delimited; otherwise, the query might have trouble parsing.

For example, two cities share the same name: New Albany in New Jersey, USA, and New Albany in Nova Scotia, Canada. If the provider returned the MEMBER_UNIQUE_NAME column of the MEMBERS rowset for these two members without using delimit characters, the returned values would be USA.New Jersey.New Albany and Canada.Nova Scotia.New Albany, respectively. The consumer could put delimit characters around each name: [USA.New Jersey.New Albany] and [Canada.Nova Scotia.New Albany]. However, the provider would be unable to determine the individual components that form the unique name because it is unclear whether the period (.) acts as a separator or is a part of the name. Therefore, the provider should return the MEMBER_UNIQUE_NAME column with each component delimited: [USA].[New Jersey].[New Albany] and [Canada].[Nova Scotia].[New Albany].

A provider that constructs a unique name out of component names should return component-delimited identifiers (that is, each component of a compound identifier should be delimited) in the following places:

  • All _UNIQUE_NAME columns of a schema rowset.
  • The MEMBER_UNIQUE_NAME column in the axis rowset.
  • All column names in the flattened dataset.
  • Column values of any columns that correspond to the MEMBER_UNIQUE_NAME property in a flattened dataset.

Providers are not required to construct unique names by using the "path" to a member (or any other schema object). The provider is free to construct the unique name in any way. Applications should treat a unique name as an opaque string with no structure. For more information, see the section "Namespace and Unique Names" in Chapter 25: Multidimensional Expressions.

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