xHarbour Reference Documentation > Function Reference |
Closes all indexes open in a work area.
OrdListClear() --> NIL
The function always returns NIL.
OrdListClear() closes all indexes open in a work area. When indexes are closed, database records can only be navigated in their physical order, since a logical order is no longer present.
See also: | DbClearIndex(), OrdListAdd(), OrdListRebuild() |
Category: | Database functions , Index functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example creates two indexes and demonstrates the effect of // closing the indexes with OrdListClear() PROCEDURE Main USE Customer INDEX ON Upper( FirstName ) TO Cust01 INDEX ON Upper( LastName ) TO Cust02 USE Customer ? Recno(), LastName, Firstname // result: 1 Miller Irene OrdListAdd( "Cust01" ) ? OrdCount() // result: 1 ? Recno(), LastName, Firstname // result: 9 Feldman Allen OrdListAdd( "Cust02" ) OrdSetFocus( "Cust02" ) DbGoTop() ? OrdCount() // result: 2 ? Recno(), LastName, Firstname // result: 20 Alberts Cathy OrdListClear() ? OrdCount() // result: 0 ? Recno(), LastName, Firstname // result: 20 Alberts Cathy USE RETURN
http://www.xHarbour.com