Bret
I don't know if you know this, or, indeed if it does the RI building (I expect it does), but are you aware of the shipped utility GenDBC.prg that creates a whole database, in code, from the input database?
Thought maybe this would help
Terry
>I have been creating a new database on the fly from several exsting tables for a major conversion project. During this conversion I add tables, set up indexes, set up keys, run Alter Database commands, etc. At the end of the conversion I have to modify the database in order for my referential integrity rules to be implemented. FoxPro Help states:
>
>Caution When you make changes to the design of a database, such as modifying database tables or altering indexes used in a persistent relationship, you should rerun the RI Builder before you use the database. Rerunning the RI Builder revises the stored procedure code and table triggers used to enforce referential integrity so that they reflect the new design. If you don't rerun the RI Builder, you might have unexpected results, because the stored procedures and triggers are not rewritten to reflect your changes.
>
>So my question is how can I automate the running of the RI Builder or how can I do this in code?
>
>TIA
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.