Article ID: 135112
Article Last Modified on 8/21/1999
***** Create each index for CUSTOMER ***** INDEX ON COMPANY TAG COMPANY INDEX ON CONTACT TAG CONTACT INDEX ON POSTALCODE TAG POSTALCODE ALTER TABLE 'CUSTOMER' ADD PRIMARY KEY CUST_ID TAG CUST_ID ***** Create each index for PRODUCTS ***** ALTER TABLE 'PRODUCTS' ADD PRIMARY KEY PRODUCT_ID TAG PRODUCT_ID ***** Create each index for ORDITEMS ***** INDEX ON ORDER_ID+STR(LINE_NO,5,0) TAG ORDER_ID INDEX ON PRODUCT_ID TAG PRODUCT_ID ***** Create each index for ORDERS ***** INDEX ON CUST_ID TAG CUST_ID INDEX ON EMP_ID TAG EMP_ID ALTER TABLE 'ORDERS' ADD PRIMARY KEY ORDER_ID TAG ORDER_ID ***** Create each index for EMPLOYEE ***** ALTER TABLE 'EMPLOYEE' ADD PRIMARY KEY EMP_ID TAG EMP_IDThese segments of code can be placed into a separate program file, procedure, function, stored procedure, or method and can be called at any time to rebuild the indexes of the tables that are in the Testdata.dbc database. You can execute Gendbc.prg with your database open and it will generate similar code for recreating your database and any indexes attached to the tables contained in it.
Additional query words: VFoxWin Utilities Tools CDX DBC
Keywords: kbcode KB135112