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_xmakendx()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XMAKENDX()
Create a supplemental index for the currently open table

Syntax
N_XMAKENDX(<cIndex>, <cDBF>)

RDD Option
INDEX ON or DBCREATEINDEX()

Arguments
<cIndex> is an index name. It is required only for NetWare SQL or Scaleable 
SQL and may be left blank for Btrieve.

<cDBF> is the name of an extendedstructure DBF.

Remarks
Creates a supplemental index from a special extendedstructure DBF. The DBF 
structure is the same as used for N_XMAKETBL().

The steps taken are the same as those taken for creating permanent indexes 
with N_XMAKETBL() (step 2), except that the DBF should contain the 
definition for only one index for each call to N_XMAKENDX().

Btrieve 6.x allows up to 119 index segments, depending on page size.  
Btrieve 5.x allowed up to 24 index segments.  (See the Btrieve Programmer's 
Manual for details.) If  you attempt to add an index that would bring the 
total to over the limit, Btrieve returns an error and will not add the 
index.

Note
The table will be closed by the N_XMAKENDX() operation. You will need to 
reopen it with N_XUSE() to continue using it.

Btrieve stores Supplemental indexes in the same file as the data and 
permanent indexes. Thus it is not possible to create an index that is local 
to one user. All supplemental indexes added by one user are immediately 
visible to all users.

Example
* Convert PATIENTS.DBF to a Table
N_XUSE('patients.dta', ...)

USE rasql.dbf

ZAP
APPEND BLANK

REPLACE FIELD_NAME WITH 'CITY', ;
        FIELD_TYPE WITH 'X', ;
        MORE WITH .T.
APPEND BLANK
REPLACE FIELD_NAME WITH 'STATE', ;
        FIELD_TYPE WITH 'X'

USE
N_XMAKENDX('phone_index', 'rasql.dbf')
N_XUSE('patients.dta', ...)


See Also: N_XMAKETBL() N_XDROPNDX() N_XAMAKENDX()

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