Subject Re: [firebird-support] Transaction Problem
Author Ann W. Harrison
sierraja2000 wrote:
> I have a program on delphi 7 and firebird 1.5 (ubuntu), the program
> manager invoce of services to water consumption. Wanted to know the
> best practice for work with the transaction so that not appear the
> messages of dead lock. I need user several could to invoice at the
> same time with no problem. Wanted to know witch the best settings the
> component: IBTransaction and yours related. Thank....

There may be a problem with your database design. Yes, two
transactions can generate invoices at the same time without
conflicting, but two transactions cannot change the same
record at the same time. So, if you have a table you use to
generate invoice numbers by reading the value of a field and
incrementing it, you will have conflicts. Firebird has generators
(also called sequences) that supply unique values; they're
faster than keeping a counter in the database and they don't
cause deadlocks.

Good luck,