Subject | Re: Using a IB_Script to create new fields |
---|---|
Author | petesouthwest |
Post date | 2006-03-09T13:38:20Z |
Thanks for the help everyone :)
I must admit i was using a script as I thought that was the only way
to manipulate the tables.
Now I know better...... ;)
Pete
--- In IBObjects@yahoogroups.com, "petesouthwest" <petesouthwest@...>
wrote:
I must admit i was using a script as I thought that was the only way
to manipulate the tables.
Now I know better...... ;)
Pete
--- In IBObjects@yahoogroups.com, "petesouthwest" <petesouthwest@...>
wrote:
>
> Hi
>
> I have an existing application, that connects to a Firebird database
> created by 3rd party database manager. I would now like my 'updated'
> application to create several new fields in the database. AFAIU i can
> use a script with something like:
>
> ALTER TABLE SONGS
> ADD ARTIST1_ID INTEGER;
> COMMIT;
>
> (from a previous post :)
>
> and then do
> IB_script1.execute;
> after connecting to the database.
>
> This seems to work ok the first time its run, but once the new field
> has been added, running the program again causes problems, i assume
> due to trying to create a field that already exists.
>
> Is it enough to simply use
> try IB_script1.execute
>
> or should I be trying to determine if the field exists, and if so how?
>
> Many thanks for any help given
>