Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Lock in c#,SQL SERVER
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
How to Lock in c#,SQL SERVER
Divers
Thread ID:
01397599
Message ID:
01397599
Vues:
118
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform