Subject Re: Trigger in wrong time
Author mmenaz
--- In IBObjects@y..., "andreventu" <andre_scaravelli@u...> wrote:
> Hi all,
> I created a trigger before update in my table. When the Pessimistic
> Lock property is set to true, the trigger active when the table
> change to edit mode.

That's because IB has not a record lock in the traditional sense. IBO does a trick producing a "dummy update" (assigning a field its value) and so activating the transaction versioning stuff (or something like that ;))

> Shouldn't it active when I post the data? How
> can I do to active the trigger after the post without set the
> Pssimistic Lock property to false?

You can't. One trick Geoff Worboys suggested me time ago whas to have a "special field" in each table, like LOCK_FLG char, define your own "LockSQL" in the LockSQL property, and intercept it in triggers. This way you can distinguish the dummy update from the real one (you have to reset the field flag in the afterupdate trigger or at the end of the beforeupdate one, if no afterupdate is defined)
like, in BU:
--- your code

Marco Menardi