xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

OrdFor()

Retrieves the FOR expression of an index.

Syntax

OrdFor( [<nOrder>|<cIndexName>][,<cIndexFile>] ) --> cForExpression

Arguments

<nOrder>
A numeric value specifying the ordinal position of the index open in a work area. Indexes are numbered in the sequence of opening, beginning with 1. The value zero identifies the controlling index.
<cIndexName>
Alternatively, a character string holding the symbolic name of the open index can be passed. It is analogous to the alias name of a work area. Support for <cIndexName> depends on the RDD used to open the index. Usually, RDDs that are able to maintain multiple indexes in one index file support symbolic index names, such as DBFCDX, for example.
<cIndexFile>
<cIndexFile> is a character string with the name of the file that stores the index. It is only required when multiple index files are open that contain indexes having the same <cIndexName>.

Return

The function returns a character string holding the FOR condition of the specified index. If the index is created without FOR condition, or if no index is open an empty string ("") is returned. If no parameter is passed to OrdFor(), the function returns the FOR condition of the controlling index.

Description

OrdFor() returns the FOR expression of an index as a character string. It is similar to OrdKey() which returns the index key expression.

Info

See also:DbOrderInfo(), INDEX, OrdCondSet(), OrdCreate(), OrdKey(), OrdName(), OrdNumber()
Category: Database functions , Index functions
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe