[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION BLDNDX()
Short:
------
BLDNDX() Interactively create a new index
Returns:
--------
<cIndexName> => New index name less extension
Syntax:
-------
BLDNDX([aFields,aDescriptions],[aIndexfiles],[Buildex])
Description:
------------
Allows point and shoot building of a new index.
[aFields] - an array of legal field names. If not
passed, all fields in current DBF will be used.
[aDescriptions] - an array of field descriptions. If
not passed,field names in current DBF will be used.
Pass both or neither of [aFields] and
[aDescriptions].
[aIndexFiles] - an array of currently open index
files to be reopened on exit from bldndx() (up to 10).
Otherwise, only the newly created index file will be left open.
[lBuildex] - allow use of Buildex() to build complex
expressions. Default is False.
Examples:
---------
BLDNDX()
-- or --
aNdxFlds := {"LASTNAME","FIRSTNAME","CITY"}
aNdxDesc := {"Last Name","First Name","City"}
aNdxOpen := {"CUSTOMER","STATE","ZIPCODE"}
BLDNDX(aNdxFlds,aNdxDesc,aNdxOpen)
BLDNDX(nil,nil,aNdxOpen,.t.) // use buildex()
Warnings:
----------
Indexes created with this function will require the
functions DTOS() and NBR2STR() be loaded prior to use if a date
or numeric field is part of the index. You can do this with the
EXTERNAL statement.
EXTERNAL DTOS, NBR2STR
Notes:
-------
All fields are converted to type Character. The
function NBR2STR() is used to create a usable character
expression from a numeric field by first adding 1,000,000 to the
number.
Source:
-------
S_BLDNDX.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson