Subject Re: [firebird-support] Re: Transactions in Firebird
Author Ann W. Harrison
sqlsvr wrote:
> Thanks for the response. Do I need to declare a transaction in the application layer then?
>

Absolutely. Firebird has no clue which statement you expect to
execute together.

The Firebird model of transactions is that they are client-controlled
groups of statements that succeed or fail as a unit. Nothing in
Firebird will automatically commit (or roll back) a transaction except
a network error or server crash. If your connection dies during a
transaction, that transaction will be rolled back.

In some open source databases, any failure of a statement causes
the transaction to rollback. Not so with Firebird. If you get an
error - duplicate value where there's a unique constraint, failure
of a check constraint, datatype mismatch, etc. - the application
has the opportunity to change the statement and retry it.

In other databases, introducing a DDL statement causes an implicit
commit of the current transaction. Firebird does not. You will
get very odd behavior if you try to create a table and use it in
the same transaction, but you will still have the opportunity to
decide to save your work or roll it back.


Good luck,

Ann