Subject Re: [IBO] How to handle a deadlock
Author Jason Wharton
You can tap into the OnError event and instead of allowing the default error
to take place you can call SysUtils.Abort. Keep retrying the operation until
it is successful.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Christian Gütter" <cguetter@...>
To: <ibobjects@yahoogroups.com>
Sent: Thursday, February 01, 2001 7:58 AM
Subject: [IBO] How to handle a deadlock


> Hi,
>
> I have written an application
> which completely updates a small
> table when it starts.
>
> So there is a high risk that a deadlock
> occurs when another user is also updating
> this table.
>
> Because this is a routine which executes
> automatically I don't want to confuse the
> users with deadlock messages.
>
> So I wonder how to hide such a message.
> It should be work like:
>
> if Error = deadlock
> then
> begin
> DoThis;
> DontDisplayMessage;
> end;
>
> I know the code above looks quite funny and
> naive, but I guess it shows very clearly what
> I want to accomplish.
>
> I have had a look at IB_Header.pas and IB_Session.pas,
> but I couldn't figure out how to do it.
>
> (Anyway, I think having a look at IB error handling
> is generally worth a lot ;-)
>
>
> TIA,
>
> Christian
>
>
>
>
>