skip to main content
Developing ADO Applications : Data Shaping
 

Data Shaping

Data shaping allows you to create hierarchical recordsets with data exposed by an ADO/OLE DB data provider. This is done through the MSDataShape OLE DB provider, which is part of the MDAC. MSDataShape acts as a service component to the ADO data provider to expose data shaping functionality.
To perform queries, MSDataShape uses a Shape language, which is functionally similar to SQL. For more information about the Shape language, refer to your MDAC documentation.
You specify the data provider in the Connection object connect string by typing Data Provider=DataDirect OpenAccess for ADO Provider. The data provider supplying data shaping support is specified in the Connection object Provider property as MSDataShape.
For example, the following code fragment can be used to create hierarchical recordsets with data exposed by the ADO data provider using the ADO data source named HR:
Dim cnn As New ADODB.Connection
cnn.Provider = "MSDataShape"
cnn.Open
"Shape Provider = DataDirect OpenAccess for ADO Provider;
DataSourceName = HR;
User ID = Mary Smith;
Password = human"