You have a lot of options given here, and I may be over simplifying, but two more things come to mind...
1. Use AFIELDS(aTable) to get the structure of an existing table and CREATE TABLE MyTable FROM ARRAY(aTable) to create the new table.
2. You can include an empty table with the structure and indexes you want in your exe and copy it to the user's hard drive. For example, to create a history table for each new account in a system. You include an empty table "Hist.dbf" with the index structure you want in the project. To create the empty history table for the simpson account you execute the following:
(cTableName is set to 'Simpson_History')
USE Hist IN 0
SELECT Hist
COPY TO (cTableName) WITH CDX
USE IN Hist
>I want to put a tables structure into a program so that I can create it elsewhere.
>
>Does anyone know of a program like GENDBC that will just generate the code for a single table, like EVIEW does for views.
>
>Thanks
>Kev
David.