Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xdropndx()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XDROPNDX()
Remove supplemental index

Syntax
N_XDROPNDX(<nIndex> [,<lKeepOrder>])

Argument
<nIndex> is the index to remove, designated by its number in the order of 
creation (not necessarily the same as its number in the current index 
order). That is, if it was the Nth index created, pass N as the argument.

Specify <lKeepOrder> as True in order to prevent Btrieve from reordering any 
indexes that were higher in number than the dropped index (Btrieve 6.x, 
only). The default is False.

Returns
True if successful. False on failure. Use N_XERROR() to get an error code.

Remarks
If the specified index number does not exist then no action is taken. If  
you attempt to drop a permanent index then RaSQL generates an error.

Once you drop an index,  Btrieve renumbers downward any trailing 
supplemental indexes unless you specify <lKeepOrder> as True. For instance, 
in the below example if there were an index #5, then Btrieve would renumber 
it as index #4 after the drop operation.

While not necessary, we recommend that you have a file open exclusively when 
dropping an index.

Example
* Drop supplemental index created in 
* example for N_XMAKENDX()
N_XUSE('patients.dta', ..)
? N_XINDEXKEY(4)
CITY, STATE
N_XDROPNDX(4)
N_XUSE('patients.dta', ..)


See Also: N_XMAKETBL() N_XMAKENDX() N_XAMAKENDX() N_XOPENMODE()

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