|Subject||Re: [IBO] Pessimistic Lock|
> TIB_Query.PessimisticLocking=True;First be sure you need PessimisticLocking. Presuming you decide
> 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 ?
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...
- The IBO online help - available where you downloaded IBO.
(Also: http://www.ibobjects.com/ibodownload.html )
- The release notes (distributed in the IBO Source as
- FAQ and Tech Sheet information at www.ibobjects.com
- Getting Started Guide:
- The firebird website: http://firebird.sourceforge.net/
(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: http://www.ibphoenix.com/
- Claudio Valderrama's resource site: http://www.cvalde.com/
- Ivan Prenosil's site: http://www.volny.cz/iprenosil/interbase/