Ok, thanks Graeme.

Kind regards,

Heather

On 20/07/2010 17:14, Graeme Geldenhuys wrote:
> Hi Heather,
>
>> What to do if an object has been read and already been updated by
>> someone else in the database when trying to commit any changes?
>> How should this be handled?
>
> I find this is very dependent on the application and company policies
> - having the framework handle this automatically (in whatever way) may
> not always be the desired behaviour. I believe this is why tiOPF
> doesn't include something like this by default.
>
> So what we do in our company software, is implement a "system locks"
> feature. We have a 'systemlocks' table in the database. Before the
> application enters a section of the application that must be
> protected, it requests a system lock, then later when the user exists
> that area, it releases the lock.
>
> eg:
>    lock := gAppManager.RequestLock(SystemArea, CurrentUser);
>     if Assigned(lock) then
>    begin
>      ... open object maintenance dialog ...
>      gAppManager.ReleaseLock(lock);
>    end;
>
> Any other users that enter that same area, will not be blocked from
> entering, but will get a message saying that that area is "read-only"
> due to another user using it. In that message dialog, there is also an
> option to send the other user a message (like "please get out - I have
> something urgent to do").
>
> Like I said, this is how our company wanted to handle things, and has
> been working create for us. If you get a system failure while a lock
> is active, it might not get released. Some user with "admin" or
> "manager" rights can then release any locks via the "Locks
> Maintenance" screen. That screen will indicate the timestamp of the
> lock, the user that received the lock, and the area in the system that
> was locked.
>
>



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
tiOPF-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tiopf-talk

Reply via email to