Subject | Locking tables or dirty read |
---|---|
Author | a_broekhuis |
Post date | 2004-06-30T08:18:30Z |
Hi,
I have a system where multiple users can select/insert data. At some
point I have a key that is an integer that gets incremented very
often. All insertions are in transaction. If user a starts a
transaction it starts with updating the key, after that is does
several other inserts. While user a is performing these queries user b
starts a new transaction, it tries to increment the key and use it
(that is the old value, because user a didn't commit yet). This gives
a primary key constraint because the transaction of user a is finished
during this period.
How can I solve this? Can I lock a table with FB, or is it possible to
set some dirty read option?
I am using FB1.5 superserver on winXP.
TiA,
Alexander
I have a system where multiple users can select/insert data. At some
point I have a key that is an integer that gets incremented very
often. All insertions are in transaction. If user a starts a
transaction it starts with updating the key, after that is does
several other inserts. While user a is performing these queries user b
starts a new transaction, it tries to increment the key and use it
(that is the old value, because user a didn't commit yet). This gives
a primary key constraint because the transaction of user a is finished
during this period.
How can I solve this? Can I lock a table with FB, or is it possible to
set some dirty read option?
I am using FB1.5 superserver on winXP.
TiA,
Alexander