You can use local SQL to actually add the column - if there are no constraints etc

"ALTER TABLE "Shared.db" ADD NewField VarChar[25]"

I would tend to look for the field and put the add field code in an except block. Since
it's a shared file you're probably opening it anyway.

Max

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, 23 February 1999 16:52
To: Multiple recipients of list delphi
Subject: [DUG]: Adding a new column to a db file




I have a program that reads from a shared db file.  I need to add a new
column to the table if it is not already in it.  Does anyone have a small
sample of how to do this?


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to