Resources

About OLE DB Properties

Properties are characteristics of an OLE DB object, which means that 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.

Property group names correspond to a 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).

Refer to the following topics for information about property sets, property groups, and property-related methods:

You also can view properties in the following formats:

Note: When specifying properties and cursor location on a recordset, the properties need to be specified after the cursor location is set. Certain properties can only be specified for the server. If the cursor location is specified after the properties, you may not see an error and you may have unexpected results. For more information, see the discussion of SAS customized properties in Known Issues.


Supported Property Groups

The following table lists the major property groups. The local, SAS/SHARE, and IOM data providers support these groups; however, not all property sets within the groups are supported by all providers. See Supported Property Sets for a list of supported property sets.

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.

Note: Recall that property sets specific to SAS begin with DBPROPSET_SAS_ .


Property Set GUID Associated Property Group Description Local Provider IOM Provider OLAP Provider SHARE Provider
DBPROPSET_DATASOURCE Data Source Associated with data sources. Yes Yes Yes Yes
DBPROPSET_DATASOURCEINFO Data Source Info Static information about data sources. Yes Yes Yes Yes
DBPROPSET_SAS_DATASOURCEINFO Data Source Info Static information about data sources that are specific to SAS providers. Yes no no no
DBPROPSET_DBINIT Initialization Associated with initializing the data source. Yes Yes Yes Yes
DBPROPSET_SAS_DBINIT Initialization Aspects of initializing the data source that are specific to SAS. Yes Yes Yes Yes
DBPROPSET_SAS_ROWSET Rowset Aspects of rowsets that are specific to SAS. Yes Yes Yes Yes
DBPROPSET_ROWSET Rowset Associated with rowsets. Yes Yes Yes Yes
DBPROPSET_SESSION Session Associated with sessions. Yes Yes Yes Yes
DBPROPSET_SAS_SESSION Session Aspects of sessions that are specific to SAS. no 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 is a list of OLE DB objects with their property-related methods. All four SAS Data Providers support these methods. For more information about these methods, see the OLE DB documentation.

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(s) that are returned after the command is executed.
Rowset IRowsetInfo GetProperties Retrieves values for all properties that the specified rowset supports.