Subject Re: [ib-support] Add a column to a table via stored proc
Author Ann W. Harrison
At 12:34 PM 10/1/2002 +0100, Dave Bullar wrote:
>I am using ibobjects with firebird.
>I want to add a column to table B when a new record is added to Table A. Via
>a trigger and a stored proc.

Generally that's a sign of carrying a workaround from
database x to Firebird. Perhaps you could explain what
you're trying to achieve...

>I cannot do this using SQL syntax ('alter table B add Fred smallint')
>because that is not available in stored proc. But I suppose I can alter the
>appropriate RDB$ files by stored proc.

Yes you can, but you can't use the result. Metadata changes are not
instantiated until the transaction commits. You can't commit from a
stored procedure or trigger.

In fact, all the limitations of commit/ddl in stored procedures and
triggers is deliberate and architectural. Stored procedures and
triggers affect data, they do not affect the operating environment.
So, basically, what you're trying to do goes against the grain of
the database.



Regards,

Ann
www.ibphoenix.com
We have answers.