On 4/25/07, Derek Kalweit <[EMAIL PROTECTED]> wrote: > Hello. I'm sure I'm not the first to have the need for it-- I need a > way to detect the current database setup(tables, fields, indexes) and > alter the MSSQL database appropriately based on the current state.
In past development, QA and beta environments, I've used xCase to synchronize changes between the xCase model and the target database. xCase also helpfully provides SQL change scripts, which I've captured and used to incrementally modify production databases. With Fox as the front end, I have used a "master" table on the target database that held the database version, say '42.' When an administrative front end connected, it queried the version number, then sent modification scripts to the back-end to update it to the current version, say, 42to43.sql, 43to44.sql and 44to45.sql. The administrator application that does this has to have god-like rights into the database. Note, too, you could add your own scripts, so if you needed to fill in a lookup table or do more complex manipulations you could do that, too. This has the additional benefit that front ends for clients could just check the target db and report "out of date database, contact your administrator." > can't find an easy way to do the same for indexes. I use an XML file > for my database definition. And xCase uses dbfs, interestingly enough. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

