Subject RE: [firebird-support] Deadlock when 2 session update the same 01 row
Author Svein Erling Tysvær
>I am newbie to Firebird, I am working on Oracle and porting a small module to Firebird. We
>face with very strang problem:
>When session A and B update a row in a table at the same time. If A goes first, and while A
>does not commit or rollback yet, B will update the same row. In Oracle, B will be blocked
>until A commit or rollback without any error. But In Firebird, B will get Deadlock
>Can I config FB to do exactly like Oracle does? Or, It is a bug?

Hi and welcome, Nguyen!

No, it is no bug. This is called 'lock resolution' and belongs to your transactions (strictly speaking, this is a lock conflict, not a deadlock). So, you could have isc_tpb_nowait on transaction A and isc_tpb_wait on transaction B and then transaction A would behave like you report your system is doing, whilst transaction B would behave as you would like it to behave.

How to set these things depend on what kind of components you use. Using IB Objects, I would simply set TIB_Transaction.LockWait to true (though I've never actually done this myself), other components will have different ways of doing this.