Subject Re: [IBO] Using a IB_Script to create new fields
Author John vd Waeter
Hi,

use IB_Conection.schema.gettablelist and getfieldlist to determine if
the field exists...

regards
John

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
>
>
>
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>