Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - delete tag http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DELETE TAG
 Delete a tag from a compound (.cdx) index
------------------------------------------------------------------------------

 Syntax

     DELETE TAG <cTagName1> [[IN <cCDXName1>]
        [,<cTagName2> [IN <cCDXName2>]]...]

     or

     DELETE TAG ALL [IN <cCDXName>]

     <cTagName> is a character string that specifies the name of the tag
     to delete.  The specified name must not include a file extension, as
     tags are not defined with one.

     IN <cCDXName> identifies the .cdx file that contains the specified
     tag.  If necessary, this eliminates conflicts if two .cdx files have
     the same tag name.

     DELETE TAG ALL deletes the current or specified .cdx file.

 Description

     DELETE TAG deletes one or more tags in a .cdx index.  If <cCDXName>
     is not specified, the open .cdx indexes are searched in the index order.
     The index order is the order by which the .cdx files are opened,
     starting with the structural .cdx (if one exists).  The first occurance
     of the tag name will be deleted.  The .cdx file space occupied by the
     deleted tag is not re-used.

     Files must be opened EXCLUSIVEly to use the DELETE TAG command.  If
     the specified tag is the only tag in the .cdx file, the .cdx file is
     deleted.

     Note:  The DELETE TAG command works only with .cdx files.  This
     command has no effect on .idx or .ntx index files.

     Note: DELETE TAG is illegal if performed within a transaction.
     If DELETE TAG is called while within a transaction, a runtime error
     will occur.

Example

     #include "DBFCDXAX.CH"

     USE test.dbf VIA "DBFCDXAX"

     // Create 3 tags in TEST.CDX
     INDEX ON last TAG last
     INDEX ON age TAG age
     INDEX ON state TAG state
     ? AX_TagCount()                 // Returns 3

     DELETE TAG age                  // Delete the AGE tag
     ? AX_TagCount()                 // Returns 2

     DELETE TAG ALL IN test.cdx      // Delete ALL tags and delete .cdx file

     ? AX_TagCount()                 // Returns 0


See Also: AX_KillTag() AX_TagCount()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson