xHarbour Reference Documentation > Command Reference |
Deletes a tag from an index.
DELETE TAG <cIndexTag1> [IN <cIndexFile1>] [, <cIndexTagN> [IN <cIndexFileN>] ]
The DELETE TAG command deletes an index from an index file in the current work area. The index is identified by its tag name, which is equivalent to an alias name of a work area. If no index file is specified, all indexes in the current work area are searched for a matching tag name. When the tag name does not exist or the index file is not open, a runtime error is generated.
If the index to delete is the controlling index, the records in the current work area are listed in physical order after index deletion.
Note: The number of indexes that can be stored in an index file is determined by the replaceable database driver maintaining a work area. While DBFNTX and DBFNDX support only one index per file, the DBFCDX RDD supports many indexes in one index file.
See also: | INDEX, OrdDestroy(), SET ORDER, SET INDEX |
Category: | Database commands , Index commands |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example creates three indexes in one file using the DBFCDX driver. // The effect of deleting the controlling index is demonstrated. REQUEST DBFCDX PROCEDURE Main RddSetDefault( "DBFCDX" ) USE Customer INDEX ON Upper(FirstName) TAG FName TO Cust01 INDEX ON Upper(LastName) TAG LName TO Cust01 INDEX ON Upper(City) TAG City TO Cust01 FOR n:=1 TO 3 ? OrdName(n), OrdKey(n) NEXT WAIT SET ORDER TO TAG City Browse() DELETE TAG City Browse() USE RETURN
http://www.xHarbour.com