Показать сообщение отдельно
Старый 08.05.2008, 17:28   #6  
ivas is offline
ivas
Участник
Аватар для ivas
 
252 / 68 (3) ++++
Регистрация: 22.12.2005
а если так переписать?
X++:
run()
{
    Trans trans;
    Trans buffer;
    ;

    select trans where trans.open == true;

    while (trans)
    {
        try
        {
            ttsbegin;
            buffer = Trans::find(trans.recid, true);
            buffer.open = false;
            buffer.update()
            ttscommit;
        }
        catch (Exception::Deadlock)
        {
            next trans;
            retry;
        }
        catch (Exception::UpdateConflict)
        {
            next trans;
            retry;
        }
        next trans;
    } 
}
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy