Subject Re: creating tables within transactions
Author mikcaau
--- In, Stefan Balzter <email@s...>
> Hello,
> I understand that there is no way of creating and populating a table
> within a single transaction? Dito for creating foreign keys in other
> tables that refer to the newly created table?
> If I try this, I receive an error that the table is unknown. It
works if
> I create, commit and then continue.
> If I'm right, does this have a reason? I must admit it's quite annoying
> sometimes. I mean, it's supposed to be the meaning of transactions to
> bundle tasks that should be performed altogether or not at all - in my
> book this applies to creating a table and creating other database
> objects related to that table.
> I use FB 1.5 on a windows XP machine.
> Thanks,
> Stefan
Data definition commands cannot be mixed with data manaipulation commands.
Creating tables and foreign keys are data definition tasks.
Adding daa to a table is a data manipulation task.
I find it difficult to imagine circumstances where tables need to be
made on the fly.