The Microsoft Data Shaping Service

The Microsoft Data Shaping Service is one of two providers necessary to create a shaped recordset with a connection to a data source. The other is a data provider such as SQL Server. In this case, SQL Server would supply the data to the MS Data Shaping service, which would supply it to the application, through ADO.

To specify the MS Data Shaping Service, in the ConnectionString property, set the Provider keyword to MSDataShape. When the Provider property is set to MSDataShape, the connection string gains a dynamic property called Data Provider, used to specify the source of the data provided to the MS Data Shaping Service.

The following example shows how the MS Data Shaping Service property is used in conjunction with the MS Jet Engine:

Dim con As ADODB.Connection

Set con = New ADODB.Connection
    
con.ConnectionString = "Provider=MSDataShape; " _
                     & "Data Provider=Microsoft.Jet.OLEDB.4.0; " _
                     & "Data Source=C:\My Documents\Biblio.mdb; "
    
con.Open

'
' do something here
'
con.Close
Set con = Nothing

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.