RDD

OrdKeyNo()

Return the current key position in an order

Syntax

Signature
OrdKeyNo( [cOrder | nPosition], [cIndexFile] ) --> nKeyNo

Arguments

Optional order selector and index file.

Return value

Logical position of the current record in the selected order.

Description

OrdKeyNo() returns the current record's position within the selected order.

Notes

The result is order-relative rather than a physical record identity.

Example

OrdKeyNo.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "Key position: " + LTrim( Str( OrdKeyNo( 1 ) ) ) )
   DbCloseArea()

RETURN

Output

See also