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_xindextype()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XINDEXTYPE()
Get attributes of a specified index

Syntax
N_XINDEXTYPE(<nIndex>)

Argument
<nIndex> is the number of an index in the current table.

Returns
A string containing eight characters for each segment in an index. The value 
of the 8byte string indicates the flag setting of the associated segment as 
it was defined when the index was created. For example, an index on State, 
City, Zip would return a string of 24 (3 * 8) bytes

Remarks
Normally used in conjunction with N_XINDEXKEY(). 
Each 8byte string can contain zero or more of the codes listed below. Each 
code occupies a specific byte of the string. When a byte contains a letter, 
the index attribute was on. When it contains a space, the index attribute 
was off. 

       Byte      Code      Meaning
          1              D         Descending
          2              M         More segments to follow
          3              N         Nulls allowed
          4              Q         Unique (duplicates not allowed)
          5              S         Static (not modifiable)
          6              U         Uppercase (case ignored / alternate 
                                   collating sequence is UPPER)
          7              *         Supplemental index
          8                        reserved

See Appendix C for a list of index attributes.

Note that the first six bytes of the string are in the same format (DMNQSU) 
as the index-attribute string of N_XAMAKETBL() and N_XAMAKENDX(). This 

Can be useful for creating new indexes that have precisely the same 
attributes as existing indexes.

Example
* Assume index 2 is on Zip, State, City 
* where Zip is descending, City and State 
* are Uppercase
? N_XINDEXTYPE(2)
DM      ; M   U  ;     U  ;


See Also: Appendix C N_XAMAKENDX() N_XAMAKETBL() N_XINDEXKEY()

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