Using Type Indicators in Providers

OLE DB Programmer's Reference

OLE DB defines a standard set of data type indicators for the most commonly used data types. Providers use these data type indicators to tell consumers what data types they support. Each provider maps its own underlying data types to these data type indicators and advertises its support for them through the PROVIDER_TYPES schema rowset. The underlying data types used by the provider are unimportant to the consumer. What is important is that the provider guarantees that it can always safely transfer data in the type represented by the indicator it advertises for a column or parameter. For examples of how various providers might map underlying data types to OLE DB data types, see the following sections.

Providers are not required to support all of the OLE DB data types listed in "Type Indicators" in Appendix A: Data Types, nor are they required to support all possible conversions among them. For information about what conversions all providers are required to support, see "Data Type Conversion," later in this chapter.

Although OLE DB attempts to provide a unified type system, it is subject to the following limitations:

  • It does not standardize type names as used in text commands. The TYPE_NAME column in the PROVIDER_TYPES schema rowset contains the type name consumers should use when executing data definition language (DDL) commands. This saves providers from having to parse such commands before passing them to the data source.
  • It exposes data store–specific type names for parameters in text commands. For more information, see ICommandWithParameters::SetParameterInfo in the reference section.

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