xHarbour Reference Documentation > Function Reference |
Retrieves the file name of an open index.
OrdBagName( [<nOrder> | <cIndexName>] ) --> cIndexFilename
The function returns the name of the index file that contains the specified index as a character string. If no parameter is passed, the function returns the file name of the controlling index. If no index file is open, an empty string ("") is returned.
OrdBagName() retrieves the name of the index file in which an index is stored. The index can be specified by its numeric ordinal position, or by its symbolic name specified with the TAG option of the INDEX command.
See also: | DbOrderInfo(), OrdBagExt(), OrdCreate(), OrdFor(), OrdKey(), OrdName(), OrdNumber(), RddName() |
Category: | Database functions , Index functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example lists results of OrdBagName() using two different RDDs. REQUEST Dbfcdx PROCEDURE Main USE Customer VIA "DBFNTX" SET INDEX TO Cust01, Cust02 ? OrdBagName() // result: Cust01.ntx ? OrdBagName(1) // result: Cust01.ntx ? OrdBagName(2) // result: Cust02.ntx ? OrdBagName(3) // result: (empty string) USE Invoice VIA "DBFCDX" SET INDEX TO Invoice ? OrdName() , OrdBagName() // result: InvNo Invoice.cdx ? OrdName(1), OrdBagName(1) // result: InvNo Invoice.cdx ? OrdName(2), OrdBagName(2) // result: Custno Invoice.cdx ? OrdName(3), OrdBagName(3) // result: (empty string) CLOSE ALL RETURN
http://www.xHarbour.com