Solved

Add no lock to a select statement in access

Posted on 2008-06-16
8
1,799 Views
Last Modified: 2012-05-05
I have a select statement in access shown in the snippet,

how do i add no lock
SELECT scheme_opdetm.*, scheme_opheadm.order_no
FROM scheme_opheadm LEFT JOIN scheme_opdetm ON scheme_opheadm.order_no = scheme_opdetm.order_no
WHERE (((scheme_opheadm.order_no)="947579"));

Open in new window

0
Comment
Question by:meteorelec
  • 4
  • 3
8 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21794039
NOLOCK is only MS SQL Server syntax, and cannot be used in access queries..
0
 
LVL 1

Expert Comment

by:1nmisri
ID: 21794088
This where I have put it in the other SQL queries

SELECT scheme_opdetm.*, scheme_opheadm.order_no
FROM scheme_opheadm(nolock)
 LEFT JOIN scheme_opdetm ON scheme_opheadm.order_no = scheme_opdetm.order_no
WHERE (((scheme_opheadm.order_no)="947579"));
0
 
LVL 2

Author Comment

by:meteorelec
ID: 21794108
Really, even when i use the sql view as apposed to the design view?
0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
LVL 2

Author Comment

by:meteorelec
ID: 21794145
So is it not possible to query data in access when it is in use?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21794268
how do you run the query? is this a ADP?
0
 
LVL 2

Author Comment

by:meteorelec
ID: 21794388
No i use Access 2003.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 21794437
so, you create a plain query in your access, on plain access tables?
or is this a PassThrough query to sql server tables?

if its plain access query ... NOLOCK cannot be used.
0
 
LVL 2

Author Comment

by:meteorelec
ID: 21794592
Thanks thats sorted it,

I'm now using a pass through query
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with duplicate records in Oracle query 16 40
T-SQL: Do I need CLUSTERED here? 13 59
date diff with Fiscal Calendar 4 57
performance query 4 32
Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question