Topic: Lock a record

Hello,
I have an application going into a multi user environment with a SQLite database developed with MVD version 3.4. There are probably about 3 to 6 users.
When someone opens an existing record to edit it, I need some way to lock that record so that if someone else opens the same record, the second person can only view the record and not be able to edit it.
I hope all that makes sense.
Thanks in advance,
David

Re: Lock a record

My ideas - but maybe working only with scripting

Idea A:
- make all records read only and a button for enabling edit
- add a field to the table which will be used for indicating locked for edit
- add a timer for closing edit after a time. Just for the case that the software crashs

Idea B:
- add a field to the table which will be used for indicating locked for edit
- add a timer for closing edit after a time. Just for the case that the software crashs
- Create a script which fill the field with an edit status when a user starts to edit or - as alternative - when a user first views a record.
This would work more or less as a first come - first edit solution.

Re: Lock a record

Check out an example
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.

Re: Lock a record

Hello teco049 and Dmitry,
thank you both for the ideas and help.
Regards,
David