On 9/23/07, robk99 <[EMAIL PROTECTED]> wrote: > Is there a method using the API to modify an existing table by adding a > column to it without deleting the original table and then recreating the > table with the new column?
That's pretty much what DdlUtils is made for. It involves basically three steps: * Read the database model from either the live database (via the readModelFromDatabase method in the Platform instance that you'll get from the PlatformFactory) or an XML file (via the DatabaseIO class). * Change the mode which is basically a bunch of objects representing tables, columns, foreign keys etc. E.g. in your case, find the table in question and simply add a column to it. * Write the database model to an XML file (again via the DatabaseIO class) or to the live database (using the alterTables method in the Platform). You could also use a variations of the above to get SQL for the alteration that you then could execute manually. Tom
