CDaoRecordset::GetPercentPosition

float GetPercentPosition( );
throw( CDaoException, CMemoryException );

Return Value

A number between 0 and 100 that indicates the approximate location of the current record in the recordset object based on a percentage of the records in the recordset.

Remarks

When working with a dynaset-type or snapshot-type recordset, if you call GetPercentPosition before fully populating the recordset, the amount of movement is relative to the number of records accessed as indicated by calling GetRecordCount. You can move to the last record by calling MoveLast to complete the population of all recordsets, but this may take a significant amount of time.

You can call GetPercentPosition on all three types of recordset objects, including tables without indexes. However, you cannot call GetPercentPosition on forward-only scrolling snapshots, or on a recordset opened from a pass-through query against an external database. If there is no current record, or he current record has been deleted, a CDaoException is thrown.

For more information about navigating in recordsets, see the article DAO Recordset: Recordset Navigation in Visual C++ Programmer's Guide. For related information, see the topic "PercentPosition Property" in DAO Help.

CDaoRecordset OverviewClass MembersHierarchy Chart

See Also   CDaoRecordset::SetPercentPosition