Solved

Add no lock to a select statement in access

Posted on 2008-06-16
8
1,793 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 …
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 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

19 Experts available now in Live!

Get 1:1 Help Now