Subject | transactions .... I thought I got it, little did I know. |
---|---|
Author | Jochem Maas |
Post date | 2007-10-26T12:25:39Z |
say I want to perform a number of inserts and treat them as a single transaction, no problem.
now imagine I need to be able to interlace the inserts with select statements and that the select
statements need to be able to read inserted records (has to do with calculated fields) that
have not yet been committed ... is this even possible.
i.e.
1. start with an empty table
2. start a transaction
3. insert a record into table
4. read back inserted record
5. determine whether to rollback or commit
I can't get this to work at all - personally I think it is odd that within a single transaction
it is not possible to perform select queries that can see data that has been inserted or updated
(but not yet commited) within the confines of the same transaction.
should this be possible? I am running FB 1.5.x, maybe I need to upgrade to FB2?
hope someone can shed some light on this or maybe point me at a decent (aka understandable) tutorial
on using transactions in firebird - I've read pretty much everything I kind find ... most of it is like
http://php/net/ibase, namely, only very useful if you already understand how to use transactions properly.
now imagine I need to be able to interlace the inserts with select statements and that the select
statements need to be able to read inserted records (has to do with calculated fields) that
have not yet been committed ... is this even possible.
i.e.
1. start with an empty table
2. start a transaction
3. insert a record into table
4. read back inserted record
5. determine whether to rollback or commit
I can't get this to work at all - personally I think it is odd that within a single transaction
it is not possible to perform select queries that can see data that has been inserted or updated
(but not yet commited) within the confines of the same transaction.
should this be possible? I am running FB 1.5.x, maybe I need to upgrade to FB2?
hope someone can shed some light on this or maybe point me at a decent (aka understandable) tutorial
on using transactions in firebird - I've read pretty much everything I kind find ... most of it is like
http://php/net/ibase, namely, only very useful if you already understand how to use transactions properly.