Subject Re: [IBO] "with lock" SQL function
Author Helen Borrie
At 04:30 PM 27/11/2008, you wrote:


>Yep.. but is there a way to get a notification that somebody is busy
>with the record,

http://www.ibobjects.com/TechInfo.html#ti_dmlcaching
and the sample Survey project

>and more importantly who is busy holding up the record.

Depending on whether you can tell who is who from the username, you could write a user-tracking utility for Fb 2.1 and above, using the MON$ tables.

>I have the problem that users go and have coffee with the recordset still in
>edit state, preventing any edits until they return.

It only prevents edits on records that are locked. You could think about implementing Autocommit (WITHOUT CommitRetaining) on transactions whose datasets are subject to a high level of overlapping activity. That way, a user's work on one record (or set of interdependent records) gets committed as soon as s/he moves to the next one.

Of course, an application has no way to know whether the user is away drinking coffee or is just taking time to look up some documents or make phone calls related to the task. In the latter case there is every reason to let the user keep the lock as long as is required.

Look at the TimeOutProps of TIB_Transaction, that might give you some ideas about how to deal with the coffee-drinkers.

Or you could threaten to take the coffee machine away! ;-)

Helen