xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

OrdIsUnique()

Retrieves the UNIQUE flag of an index.

Syntax

OrdIsUnique( [<nOrder>|<cIndexName>][,<cIndexFile>] ) --> lUniqueFlag

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 the UNIQUE flag of the specified index as a logical value. If no index is open, the function returns .F. (false). If no database is open, a runtime error is created.

Description

OrdIsUnique() queries the UNIQUE flag of an index. This flag is stored in the index file header and is set upon index creation with the INDEX command.

Info

See also:DbOrderInfo(), INDEX, OrdCondSet(), OrdCreate(), OrdFor(), OrdKey(), OrdName()
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