MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Interfaces


 

IChapteredRowset::ReleaseChapter

Releases a chapter.

HRESULT ReleaseChapter (
   HCHAPTER   hChapter,
   ULONG *    pcRefCount);

Parameters

hChapter

[in]
The chapter handle.

pcRefCount

[out]
A pointer to memory in which to return the reference count of the chapter handle. If pcRefCount is a null pointer, no reference count is returned.

Return Code

S_OK

The method succeeded.

E_FAIL

A provider-specific error occurred.

E_INVALIDARG

The rowset was not chaptered.

DB_E_BADCHAPTER

hChapter was invalid.

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

If the chapter's reference count is reduced to zero and retrieved again later, the next fetch position of the retrieved chapter is reset to the initial state.

This method can be called while the rowset is in a zombie state to allow the consumer to clean up after a transaction has been committed or aborted.

See Also

IRowset::GetNextRows, IRowsetLocate::GetRowsAt