Microsoft Data Shaping Service for OLE DB

The Microsoft Data Shaping Service for OLE DB service provider supports the construction of hierarchical (shaped) Recordset objects from a data provider.

Provider Keyword

To invoke the Data Shaping Service for OLE DB, specify the following keyword and value in the connection string.

"Provider=MSDataShape"

Dynamic Properties

When this service provider is invoked, the following dynamic properties are added to the Connection object's Properties collection.

Dynamic Property Name Description
Unique Reshape Names Indicates whether Recordset objects with duplicate values for their Reshape Name properties are allowed. If this dynamic property is True and a new Recordset is created with the same user-specified reshape name as an existing Recordset, then the new Recordset object's reshape name is modified to make it unique. If this property is False and a new Recordset is created with the same user-specified reshape name as the existing Recordset, both Recordset objects will have the same reshape name. Therefore, neither Recordset can be reshaped as long as both recordsets exist.

The default value of the property is False.

Data Provider Indicates the name of the provider that will supply rows to be shaped. This value may be NONE if a provider will not be used to supply rows.

You may also set writable dynamic properties by specifying their names as keywords in the connection string. For example, in Microsoft Visual Basic, set the Data Provider dynamic property to "MSDASQL" by specifying:

Dim cn as New ADODB.Connection
cn.Open "Provider=MSDataShape;Data Provider=MSDASQL"

You may also set or retrieve a dynamic property by specifying its name as the index to the Properties property. For example, the following code snippet gets and prints the current value of the Data Provider dynamic property, then sets a new value if cn.DataProvider has been set to "MSDataShape" (either directly or indirectly through the connection string) and the connection has not been opened:

Debug.Print cn.Properties("Data Provider")
cn.Properties("Data Provider") = "MSDASQL"

Note The dynamic property, "Data Provider", is settable only on an unopened Connection object. Once the connection is opened, the "Data Provider" property becomes read-only.

For more information about data shaping, see Data Shaping.

See Also

Data Shaping Service for OLE DB (in the OLE DB section of the MDAC SDK documentation)