>I am doing a re-design of a legacy VFP 5.0 application using VFP 6.0 and Visual FoxExpress 6.3. I have created a new database that contains only local views of the legacy database. I have also written a program that will modify the legacy database by adding a few fields, indexes, etc.
>
>The legacy system didn't enforce referential integrity. The legacy database doesn't have any persistent relationships. I would like to add code to my database modification program which will add those relationships and modify the database so that it will enforce referential integrity.
>
>How do I do this programmatically? Does anybody have experience with this?
What I suggest you do is to create a new database with a few tables and manually create a few different persistent relationships with the different behaviors you'll be wanting. This can be a scratch database - it doesn't need to be the real database.
Then run GenDBC() on it ( It's under the
Home()+"Tools\GenDBC"
directory) and view the output. It will have the code do all of that.
Insanity: Doing the same thing over and over and expecting different results.