Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking File/Row
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Locking File/Row
Miscellaneous
Thread ID:
01525628
Message ID:
01525628
Views:
84
I want to introduce some form of locking (or alternative if locking is not best practise) to ensure that Two users dont update same Table/Tables at the same time.

I have the following VFP code which has worked fine .... would be interested on how this would be coded in TSql

Do while .T.
Sele MyAlias
If Flock()
&& Do some processing which needs exclusive use of the table
Sele MyAlias
Replace MyField with MyValue Or Append Blank and Replace etc depending on circumstances
Unlock
Exit
Else
Wait Window "Please wait ... waiting to Lock MyAlias" Nowait
Endif
Enddo
Wait Clear

Would be interested on what code is required to replicate the above functionality in TSql or C#

Tia
Gerard
Next
Reply
Map
View

Click here to load this message in the networking platform