Solved

Add no lock to a select statement in access

Posted on 2008-06-16
8
1,796 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 142

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
 
LVL 2

Author Comment

by:meteorelec
ID: 21794145
So is it not possible to query data in access when it is in use?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 142

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 142

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now