Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Lock in c#,SQL SERVER
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
How to Lock in c#,SQL SERVER
Miscellaneous
Thread ID:
01397599
Message ID:
01397599
Views:
117
Hi.
I use following technique in VFP to lock a file/record:
(I want to ensure nobody else grabs a balance and updates it while I am doing something with the balance
(Have not included error checking etc)

Do while .t.
If Flock('MYALIAS')
X=MyAlias.Balance
Do Stuff (e.g. Get data from other tables)
Replace MyAlias.balance with MyNewBalance
UnLOCK
EXIT
Else
Wait window 'File in Use..Please wait' Nowait
Endif
Enddo

How ould I do this in C#, SQL Server ?

TIA
Regards,
Gerard
Next
Reply
Map
View

Click here to load this message in the networking platform