Subject | RE: [firebird-support] A question about WAIT |
---|---|
Author | Alan McDonald |
Post date | 2013-01-08T00:51:52Z |
> Thank you very much Alan for your answer.If you get the Firebird book you will have a complete explanation. You need
>
> How do you use dummy updates, can explain me more about that
> technique?
>
> Greetings.
>
> Walter.
>
to understand transaction settings little better.
In short, if you issue 'UPDATE TABLE SET PKID=PKID where PKID=:PKID'
You will either succeed, in which case you can proceed under that same
transaction to edit/update the row and commit, OR you will fail, in which
case you alert the user that someone else is editing, come back later.
I also save the username of the user who succeeds so I can tell the other
person who it is that actually has the record in an edit state.
Alan
>
>
>
>
> On Mon, Jan 7, 2013 at 6:32 PM, Alan McDonald <alan@...> wrote:
>
> > **
> >
> >
> > If 526 commits, then 535 will need to re-acquire before a successfull
> > update, If 526 rolls back, then 535 could proceed with existing
> > 'stalled' edits but the WAIT option is clumcy for the user... there's
> > no way of knowing how long they have to wait.
> > I repeat, you are better off preventing 535 from starting the update
> > until it is assured it will succeed. i.e. by obtaining an edit lock. I
> > use dummy updates to ensure the edit/lock is possible Alan
> >
> > On Tue, Jan 8, 2013 at 8:32 AM, W O sistemas2000profesional@...
> > >wrote:
> >
> >
> > > - Transaction 510 inserts a new row
> > > - Transaction 510 commits
> > > - Transaction 526 start
> > > - Transaction 526 updates the row inserted by transaction 510
> > > - Transaction 535 start, with the clause WAIT
> > > - Transaction 535 wants to update the row inserted by transaction
> > > 510 but unsuccessfully because it is locked by transaction 526
> > > - Transaction 526 commits
> > > - Transaction 535 can now update the row inserted by transaction
> > > 510? or neither with the clause WAIT can do that?
> > >
> > > Greetings.
> > >
> > > Walter.
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > >
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
> > >
> > > Visit http://www.firebirdsql.org and click the Resources item on the
> > > main (top) menu. Try Knowledgebase and FAQ links !
> > >
> > > Also search the knowledgebases at http://www.ibphoenix.com
> > >
> > >
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> >
> > --
> > regards
> > Alan McDonald
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item on the main
> (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
> Yahoo! Groups Links
>
>
>