Subject Re: Opnions on this...
Author precisa@uai.com.br
--- In IBObjects@y..., "Carlos H. Cantu" <ibo@w...> wrote:
> Hi everybody !

To avoid deadlocks I use the concept of "Processed Invoce", that is
when the user is typing it I maintain an AutoCommit ReadCommited
transaction, when he presses the "Process" button I start a
transaction , update stock , and change status to "Processed".

If the user wants to change a processed invoice I turn cached updates
on and when he presses the Apply button I update stock inside a
transaction.

The good thing with this approach is when the invoice is been typed
Interbase is validating things for me, and I get no deadlock, and the
ability to type an purchase invoce go to lanch and finish it later,
is very good, specially when you're calculating products costs
automatically, considering taxes (whe have many in Brazil).

Hope this helps,

Geraldo Lopes de Souza