OLE DB Programmer's Reference |
Returns an interface pointer on the object (command or session) that created this rowset.
HRESULT GetSpecification ( REFIID riid, IUnknown **ppSpecification);
Parameters
Return Code
Comments
This method makes no logical change to the state of the current rowset.
IRowsetInfo::GetSpecification returns an interface pointer on the object that created the rowset. If a rowset was obtained from a multiple results object, IRowsetInfo::GetSpecification returns an interface pointer on the command or session object that created the multiple results object. If the rowset was created by ICommand::Execute, this object is a command. If the rowset was created by IOpenRowset::OpenRowset, this object is a session.
If the object is not a command, it must specify the contents of the rowset. That is, it must expose interfaces that can be used to modify the contents of the rowset before the rowset is created, or it must be used to gain additional information about the rowset. If the object cannot expose such interfaces, IRowsetInfo::GetSpecification should return a null pointer in *ppSpecification. In a simple provider, such as a provider that creates a rowset over a fixed set of data, there might not be an object that created the rowset; in this case, IRowsetInfo::GetSpecification returns a null pointer in *ppSpecification.
If the rowset is the COLUMNS rowset (as returned by IColumnsRowset::GetColumnRowset), IRowsetInfo::GetSpecification returns an interface on the rowset that implemented IColumnsRowset, and not the command or session that is the parent of this rowset.
ICommand::GetDBSession | IGetDataSource::GetDataSource
1998-2001 Microsoft Corporation. All rights reserved.