Returns an interface pointer on the object (command or session) that created this rowset.
HRESULT GetSpecification (
REFIID riid,
IUnknown ** ppSpecification);
Parameters
riid
[in]
The IID of the interface on which to return a pointer.
ppSpecification
[out]
A pointer to memory in which to return the interface pointer. If the provider does not have an object that created the rowset, it sets *ppSpecification to a null pointer and returns S_FALSE. If GetSpecification fails, it must attempt to set *ppSpecification to a null pointer.
Return Code
S_OK
The method succeeded.
S_FALSE
The provider does not have an object that created the rowset.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
ppSpecification was a null pointer.
E_NOINTERFACE
The object that created this rowset did not support the interface specified in riid.
E_UNEXPECTED
ITransaction::Commit or ITransaction::Abort was called and the object is in a zombie state.
DB_E_NOTREENTRANT
The provider called a method from IRowsetNotify in the consumer that had not yet returned, and the provider does not support reentrancy in this method.
Comments
This method makes no logical change to the state of the current rowset.
GetSpecification returns an interface pointer on the object that created the rowset. 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, then 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 be used to gain additional information about the rowset. If the object cannot expose such interfaces, 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, GetSpecification returns a null pointer in *ppSpecification.
See Also