RDD

DbSetIndex()

Load an order bag into the current order list

Syntax

Signature
DbSetIndex( cOrderBagName ) --> NIL

Arguments

cOrderBagName

Index or order-bag file name.

Return value

NIL.

Description

DbSetIndex() opens cOrderBagName through the active RDD and appends its orders to the current work area's order list. It does not rebuild keys or change field data. The current record pointer stays in the same area, although a later order selection can change navigation order.

Notes

The file must exist and be compatible with the active RDD. Invalid paths, order names or file access raise an error. DbSetIndex() loads existing orders; DbCreateIndex() and OrdCreate() build new ones.

Example

DbSetIndex.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   DbSetIndex( "people.ntx" )
   QOut( "Index loaded" )
   DbCloseArea()

RETURN

Output

See also