Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the equivalent to RLOCK() under Client/Server
Message
From
01/12/2002 13:59:09
 
 
To
30/11/2002 20:50:48
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00728399
Message ID:
00728479
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform