Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting data from SQ: Svr without 'locking' the table
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00833517
Message ID:
00833654
Views:
23
AFAIK, there isn't one on the VFP side.

However, if this is going to be SQL Server only (i.e., you won't use the same query in Oracle or VFP or....), try the NOLOCK locking hint.

e.g.
select x.a, y.b from x WITH (NOLOCK) join y on x.id=y.id
This can result in a dirty read, but unless you're doing tons of queries and updates against the same tables at the same time or the queried table is in a long transaction (which is it's own problem), it's pretty unlikely.

>I feel embarrassed to ask, since I've been doing this way long enough to know the answer, but my mind has gone blank on me: When creating a remote view as in
>
>"CREATE SQL VIEW Potential_Underpayments_View1 REMOTE CONNECTION qcm_Connect1 SHARE ;
> AS SELECT ; " etc, etc.
>
>for example or when running a pass-thro query such as in:
>
>"lcSQLQry = 'SELECT h.short, pats.pat_type, pats.totchg AS pttotchg, ' + ;
>= SQLPREPARE(gnConnHandle, lcSQLQry, 'Some_Cursor')
>= SQLEXEC(gnConnHandle)" etc, etc.
>
>What is the DBSETPROP() or other related command that will apply only a "shared" lock on the target table in an MS SQL database and will prevent applying an "Exclusive" lock on that table? /psb
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform