Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access Passthrough query locking hints

Posted on 2011-09-29
1
Medium Priority
?
505 Views
Last Modified: 2012-05-12
I have been doing a bit of reading on this subject of table hints and passthrough queries and I am requested some clarification on the matter.

I have created an access database with a SQL backend and access frontend.  My connections with the SQL backend are via passthrough queries.  I have a SQL table that all users search based on criteria entered on a form and a triggered select statement in a passthrough query to retrieve records.  It is okay if dirty records are returned for the searches.

Can someone please confirm if my understanding is correct.
1.   I read that if I use 'with nolock' when I reference a table the pass through query will only
      apply a shared read lock and this should not prevent other users from searching or
     updating the table at the same time. Is the correct?

2.  If another user is currently updating the table.  Will the select query with ' with nolock' have
      to wait for the update or will it return all records as at the time of the request even if the
      records are dirty.

3.  What is the difference between using 'with nolock' and 'with readuncommitted' and which
      one is better to use.

Thanks
0
Comment
Question by:RDLFC
1 Comment
 
LVL 18

Accepted Solution

by:
jmoss111 earned 2000 total points
ID: 36817388
1. Correct to my understanding.

2. No or at least thatS what BOL says.

3. They are equivalent although NOLOCK will be deprecated in a future release of SQL Server and you should use READUNCOMMITTED
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

885 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