MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 13: Data Types in OLE DB
This chapter introduces OLE DB data type indicators. Providers use these type indicators to tell consumers what data types they support. Consumers use them when creating tables and when getting and setting data. Example mappings from native data types to OLE DB data type indicators are given for an ANSI SQL provider, a Microsoft® Access provider, and a Microsoft SQL Server provider. The treatment of string values and provider support for data type conversions are also discussed.
For more information on | Go to |
Consumers and providers | "Consumers and Providers," in Chapter 1, "Overview of OLE DB" |
Using type indicators in providers | "Using Type Indicators in Providers," in this chapter |
Type indicators in an ANSI SQL Provider | "Type Indicators in an ANSI SQL Provider," in this chapter |
Type indicators in a Microsoft Access provider | "Type Indicators in a Microsoft Access Provider," in this chapter |
Type indicators in a Microsoft SQL Server provider | "Type Indicators in a Microsoft SQL Server Provider," in this chapter |
Using type indicators in consumers | "Using Type Indicators in Consumers," in this chapter |
Using type indicators when creating tables in consumers | "Using Type Indicators When Creating Tables," in this chapter |
Using type indicators when getting and setting data in consumers | "Using Type Indicators When Getting and Setting Data," in this chapter |
Determining the type of data from a string | "String Data," in this chapter |
Fixed-length and variable-length data | "Fixed-Length and Variable-Length Data Types," in this chapter |
Provider support for data type conversions | "Data Type Conversion," in this chapter |
OLE DB uses standard OLE and Microsoft Windows® data types. To describe a data type, a type indicator is used. This is a variable of the enumerated type DBTYPE that is passed as metadata. Although it is easy to confuse the two, type indicators are not data types. For example, DBTYPE_GUID is an integer with a value of 72, not a GUID. It is used to indicate that a piece of memory contains a GUID. For more information on how data types map to type indicators as well as a complete list of type indicators, see "Type Indicators" in Appendix A, "Data Types."
Places where type indicators are used include the following: