Show/Hide Toolbars

XSharp

NoteThis command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available

Purpose

Delete one or more orders from open index files.

Syntax

DELETE TAG <xcOrder> [IN <xcIndexFile>] [, <xcOrder> [IN <xcIndexFile>]...]

Arguments

<xcOrder>The name of the order to be removed.  If <xcOrder> is a NULL_STRING or spaces, it is ignored.  If <xcOrder> cannot be found, a runtime error is raised.

 

IN <xcIndexFile>The name of an open index file, including an optional drive and directory (no extension should be specified).  Use this argument to remove ambiguity when there are two or more orders with the same name in different index files.
If <xcIndexFile> is not open by the current process in the current work area, a runtime error is raised.

Description

DELETE TAG requires that the current database be open in exclusive mode.  If this condition is not met when DELETE TAG is invoked, a runtime error is raised.

 

If you specify an index file name, DELETE TAG deletes the indicated order from that file.  Otherwise, the command searches all index files open in the current work area and deletes the first occurrence of <xcOrder> that it finds.

If the controlling order is deleted, the database reverts to its natural order and DbSetFilter() scoping.

 

Note: The RDD determines the order capacity of an index file, and DELETE TAG is supported only by RDDs with multiple-order capabilities.  For single-order index files, you must delete the entire file.

Examples

This example illustrates how to delete selected orders from an index file:

 

USE customer VIA "DBFMDX" NEW
Customer->DBSetIndex("customer")
 
// Delete the Cust01 and Cust02 orders from the
// Customer index file
DELETE TAG Cust01 IN customer, Cust02 IN customer
// or
// Customer->DBDeleteOrder("Cust01", "customer")
// Customer->DBDeleteOrder("Cust02", "customer")

Assembly

XSharp.RT.DLL

See Also

DBCreateIndex(), DbCreateOrder(), DbDeleteOrder(), INDEX, SetDefault(), SetPath()