MDAC 2.5 SDK - OLE DB Providers
Data Shaping Service for OLE DB
For all Recordsets in the hierarchy, the ActiveCommand dynamic Recordset object property always points to the same Command object used to create the hierarchy.
This code example using ADO illustrates how to access the command:
con.open "Provider=MSDataShape;data provider=None"
rs.open "SHAPE APPEND NEW DBTYPE_I4 AS KeyCol",con
Set cmd = rs.ActiveCommand