>Hello all,
>
>I have a form where two tables will have to be locked. it's a multi-users app.
>
>I am afraid that if two users get into that form, one could have a lock on table #1 and for whatever reason, the other user could have the lock on the second table.
>
>How can I make sure that when a given user gets one table locked he will also get the lock on the second table?
>
>I'm thinking about creating a table where one field would serve to tell me when a locked was made.
>
>so if field in controlling table tells me that nothing is locked I replace value with .T. so now I know I can lock the second table.
>
>And other user can't lock until user #1 is finished doing is things.
You might want to look into data buffering. Old but extensive article by the late John Koziol at
https://www.levelextreme.com/Home/ShowHeader?Activator=23&ID=39374You could also look at VFP transactions if you have to update multiple tables.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up