Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's the equivalent to RLOCK() under Client/Server
Message
De
01/12/2002 13:59:09
 
 
À
30/11/2002 20:50:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00728399
Message ID:
00728479
Vues:
20
While it is true that you can do this, it is not recommended. In order to minimize the affects on concurrency, locks should be held for the least amount of time possible.

In all of my years of developing applications against SQL Server, I have only used locking hints to hold locks once and, as it turns out, there was a better way to achieve the results that I needed.

-Mike

>I can use transaction with holdlock rowlock, ex:
>
>sqlexec(mycon,"BEGIN TRANSACTION")
>sqlexec(mycon,"SELECT field1 FROM mytable WITH (HOLDLOCK ROWLOCK) WHERE field2 = ?field2value")
>..
>...
>...
>
>...
>sqlexec(mycon,"COMMIT TRANSACTION")
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform