OLE DB Properties: Introduction

What Are OLE DB Properties?

Properties are characteristics of an OLE DB object. Data sources, sessions, and rowsets all have associated properties. Every property has a description, a value, and a type, and can be read-only or writable. Properties also have related methods that can be used to set object properties and retrieve object property information.
Properties are contained within sets that are contained within groups. A property set is a closely related collection of properties associated with one OLE DB object (for example, rowsets), or associated with one type of functionality (for example, initializing the data source component). A property group is a loosely knit group of property sets that are associated with a particular object or type of functionality. Every property belongs to a property set and, by virtue of its set, a property group.
Each property group name corresponds to an object name (like Rowset) or type of functionality (like Initialization). Property names and property set names can be used to determine whether a property is one of the OLE DB standard properties or a customized property specific to SAS.
  • Properties specific to SAS begin with DBPROP_SAS_ (for example, DBPROP_SAS_FORMATS).
  • Property sets specific to SAS begin with DBPROPSET_SAS_ (for example, DBPROPSET_SAS_DATASOURCEINFO).
You can also view properties sorted by group and set, provider, and ADO name.
Note: When you specify properties and cursor location on a recordset, you need to specify the properties after the cursor location is set. Certain properties can be specified only for the server. If the cursor location is specified after the properties, you might not see an error and you might have unexpected results. For more information, see the discussion of SAS customized properties in Known Issues for All Providers.

Supported Property Groups

The following table lists the major property groups. The local, SAS/SHARE, IOM, and Base SAS providers support these groups; however, not all property sets within the groups are supported by all providers (see Supported Property Sets).
Supported Property Groups
Property Group
Description
Data Source
Properties related to data sources.
Data Source Information
Properties that describe data sources. These properties are read-only and give unchanging information about the provider and data source.
Initialization
Properties for initializing the data source.
Rowset
Properties related to rowsets.
Session
Properties related to sessions.

Supported Property Sets

The following table lists the property sets (by their global unique identifiers (GUIDs)), associated groups, descriptions, and which providers support them.
Supported Property Sets
Property Set GUID
Property Group and Description
Local
IOM
OLAP
SAS/SHARE
Base SAS
DBPROPSET_DATASOURCE
Data Source
Associated with data sources.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_DATASOURCEINFO
Data Source Information
Static information about data sources.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_MDX_EXTENSION
Data Source Information
Static information about features supported in MDX (Multidimensional Expressions). Calculated members are supported in an Excel pivot table.
no
Yes
Yes
no
no
DBPROPSET_SAS_DATASOURCEINFO
Data Source Information
Static information about data sources that are specific to SAS providers.
Yes
no
no
no
no
DBPROPSET_DBINIT
Initialization
Associated with initializing the data source.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_SAS_DBINIT
Initialization
Aspects of initializing the data source that are specific to SAS.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_SAS_ROWSET
Rowset
Aspects of rowsets that are specific to SAS.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_ROWSET
Rowset
Associated with rowsets.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_SESSION
Session
Associated with sessions.
Yes
Yes
Yes
Yes
Yes
DBPROPSET_SAS_SESSION
Session
Aspects of sessions that are specific to SAS.
no
Yes
Yes
Yes
Yes

Property-Related Methods

OLE DB consumers use property-related methods to set properties on objects in order to force them to act in a certain way. For example, a consumer can set a property to enable an OLE DB rowset to support bookmarks. Consumers also use property-related methods to retrieve an OLE DB object's properties to find out what that object can do. For example, a consumer can get the value of a property that will reveal whether an OLE DB data source is read-only or writable.
The following table lists of OLE DB objects with their property-related methods. All five SAS providers for OLE DB support these methods. For more information about these methods, see the OLE DB documentation.
OLE DB Object, Interface, Method, and Purpose
OLE DB Object
Interface
Method
Purpose
Data source
IDBProperties
GetPropertyInfo 
Retrieves information about any property supported by a provider.
Data source
IDBProperties
GetProperties 
For the specified data source object, retrieves the values currently set for properties that belong to these property groups: Data Source, Data Source Information, or Initialization.
Data source
IDBProperties
SetProperties 
Sets Data Source or Initialization group properties for the specified data source object.
Session
IOpenRowset
OpenRowset 
Sets properties on a rowset object created from all rows in a single base table.
Session
ISessionProperties
GetProperties 
For the specified session object, retrieves the values currently set for properties that belong to the Session group.
Session
ISessionProperties
SetProperties
Sets Session group properties for the specified session object.
Session
IDBSchemaRowset
GetRowset
Retrieves information about a specified schema rowset and sets Rowset group properties for that schema rowset.
Session
ITableDefinition
CreateTable
Creates a new base table in the data source, and sets specific properties for the table's Column property group.
Command
ICommandProperties
GetProperties
For the specified rowset object, retrieves the Rowset group properties that have been set by the SetProperties method.
Command
ICommandProperties
SetProperties
Sets the Rowset group properties that must be supported by the rowset or rowsets that are returned after the command is executed.
Rowset
IRowsetInfo
GetProperties
Retrieves values for all properties that the specified rowset supports.