Subject Re: [ib-support] Idea for a new field type for FB 2,0 or IB 7?
Author lester@lsces.co.uk
> try {
> Id number = getUniqueId("invoice", "number");
> ...generate create statements for invoice and execute...

I presume this is just 'posting' the previously generated
information - which took time to create - in which case this
IS the second phase.

If not, then other users could reach the commit before this
one finishes - especially in telephone sales.

> commit();
> invoice.setNumber(number);
> } catch (...) {
> rollback();
> }

One of my problems is that generating the order must
allocate stock against the order number, and the entry
process takes time. I need to 'commit' each stage of the
stock alloaction so other users can access the same product
and not oversell it. But if the order is not completed, then
the stock must be put back. Rather than going to phase two
to update the number I stop with the hole.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services