ID: Q109578
The information in this article applies to:
Indexes or filters set to a database created either manually or with the COPY STRUCTURE EXTENDED command will be ignored when you are using the CREATE FROM command.
There are three ways to work around this behavior:
-or-
-or-
The following steps use the CUSTOMER.DBF from the TUTORIAL subdirectory under the main FoxPro directory.
Issue the following commands from the Command window or copy them into a program (.PRG) file and run the program file:
USE customer
COPY STRUCTURE EXTENDED TO test
USE test
INDEX ON field_name TAG field_name ADDITIVE
SELECT 0
CREATE result FROM test
LIST STRUCTURE
The field names are not in ascending order. The field name CNO is before
the COMPANY and CONTACT fields.
In order to have the fields sorted, use the following code:
USE customer
COPY STRUCTURE EXTENDED TO test
USE test
SELECT * FROM test ORDER BY field_name INTO TABLE query
SELECT 0
CREATE result FROM query
LIST STRUCTURE
Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60
pssbug2.50b
pssbug2.60
KBCategory: kbprg kbprb
KBSubcategory: FxprgSql
Last Reviewed: June 27, 1995