[Tutor] Record Locking & Access - newbye

Chad Crabtree flaxeater at yahoo.com
Thu Jun 24 01:08:32 EDT 2004

> Now when a user selects a record from a grid on screen I can send
> him to
> another form "Record Form" where he can edit the record. This way I
> can have
> only one query to the database and have the users working locally
> on there
> record sets. But when a user edits an existing record I puzzled to
> think
> that another user might be changing that record at the same time
> (because
> they are not locking any records and are using lists with the
> record
> contents locally)! 
> I guess this is a very common problem with a standard solution. How
> can I
> avoid this?

I have not done this personaly but *I* would just make some file on
the system that indicates wether or not the db should be "LOCKED" or
Another way that I have tought about doing it.  Maybe not in scope. 
But to create a client server system where the server is the only one
that can make db writes.  And the server acts as a que for writing. 

As I was writing I realized the trouble.  You will need to check
wether the field has changed since the user has viewed the field. 
perhaps you should have a last_changed field in each row and if it's 
newere than last viewed by the user then notify the user that he has
new information he should consider before submiting the change.

This could get tedious for the user depending on the situation.  

Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

More information about the Tutor mailing list