Subject | RE: [ib-support] Re: minimizing transaction-open time |
---|---|
Author | Tony Mays |
Post date | 2002-05-09T07:11:43Z |
That would hold nicely. It kinda like the rowid concept that I have seen in
some of the other databases I have worked with in that you have a field
(fields in your case) to determine if an update occurred. However, it
doesn't account for the fact that another user could have deleted the record
between the time you read it, made your changes and saved it. It's a
thought.
tony
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, May 08, 2002 12:54 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Re: minimizing transaction-open time
Hi,
update mytable set changecol1 = newvalue1, changecol2 = newvalue2
where idcolumn = idvalue and changecol1 = oldvalue1 and changecol2 =
oldvalue2
If the update returned '0 rows affected' we would know there was a 'lock'
error.
Worked great.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
some of the other databases I have worked with in that you have a field
(fields in your case) to determine if an update occurred. However, it
doesn't account for the fact that another user could have deleted the record
between the time you read it, made your changes and saved it. It's a
thought.
tony
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, May 08, 2002 12:54 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Re: minimizing transaction-open time
Hi,
> Doug Chamberlin wrote:We once created a system that updated only the modified column in this way:
> > Actually a much better way is
> > Start trans
> > Read record
> > Commit
> > Let user edit record taking all the time they want.
> > When they save:
> > Start trans
> > Write updates
> > Commit
>
> But you'll have to worry about whether you are updating the same database
> (as you read from) - you have to control every record that can be affected
> by the inserts/updates/deletes. Not impossible, but a chore.
> I use the timer approach (with commit or rollback), but this isn't without
> problems. I've found users returning from lunch and seeing their work has
> been rejected (rollback) having assumed that whatever they were editing
> (either in a grid or a separate form) has automagically been completed for
> them! Result: the record was never entered into the database.
update mytable set changecol1 = newvalue1, changecol2 = newvalue2
where idcolumn = idvalue and changecol1 = oldvalue1 and changecol2 =
oldvalue2
If the update returned '0 rows affected' we would know there was a 'lock'
error.
Worked great.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/