Subject RE: [firebird-support] creating tables within transactions
Author Graeme Edwards
This may not be relevant to the discussion, because I'm not sure whether
your question is a semantic one or whether you are looking for a practical
solution.

Using Delphi and either IBX or FIBPlus and the associated script components
TIBScript or TpFIBScript, it is possible to create and populate a table
within one script file.

There is a property called AUTODDL which will force the DDL commands to be
committed before the DML populates the tables.

Obviously it is not truly within the same transaction, or it wouldn't work,
however the component takes care of this for the programmer.

Graeme Edwards

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Stefan Balzter
Sent: Wednesday, 2 November 2005 7:43 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] creating tables within transactions

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



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links