Subject Re: [IBO] Pessimistic Lock
Author Geoff Worboys
> TIB_Query.PessimisticLocking=True;

> Lets say two clients are trying to access same record , one is in
> edit mode and locked the record . When the other client wants to
> edit the locked record I want to use my error trapping code to show
> a message to the other client that , that record is in edit mode.
> This should be before the second user goes to edit mode . What must
> I do ?

First be sure you need PessimisticLocking. Presuming you decide
you want it...

Try it out. See the exception that is raised and then setup your
error catching code to catch that exception (it will be an
EIB_ISCError exception, check the EIB_ISCError.ErrCode value for the
particular error code). You cannot report who has the record open,
that information is not part of the error message.

You can find information about error handling etc from the various IBO
help info (see below), information about ISC error codes is available
from the Firebird website (the IB6 beta documentation, Language
guide). I'm off to bed right now and dont have time to try and setup
a full demo code for you but the following set of links is worth
having for your future reference anyway...

IBObjects Related:

- The IBO online help - available where you downloaded IBO.
(Also: )

- The release notes (distributed in the IBO Source as

- FAQ and Tech Sheet information at

- Getting Started Guide:

Interbase/Firebird Related:

- The firebird website:
(see links to "Documentation" and "Novice's Guide").

In particular most people should download and have as reference
the IB6Beta documentation available from:

Other Useful Sites:

- IBPhoenix:

- Claudio Valderrama's resource site:

- Ivan Prenosil's site:

Geoff Worboys
Telesis Computing