General information
Title:
How to Lock in c#,SQL SERVER
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only