Solved

Access 2000 / SQL Server Record open on another PC

Posted on 2014-02-21
3
483 Views
Last Modified: 2014-03-19
We have PCs running Access 2000 front-end data entry mdbs linked to SQL Server tables via ODBC.
Is there a way to alert a user that a record they are looking at is open for editing on another PC, without bogging the network down by much?

TIA
0
Comment
Question by:machine_run
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 39878262
Not unless you store that information somewhere, and that's as troublesome as dealing with locks. In order to do that you'd add a field to each table named something like "RecordLocked" (a Boolean field). Whenever someone begins to edit a record, you set that value to True. When the Save the record, you set it to False.

When a user begins to edit, you could first examine that field, and if it's True, you'd then let the user know, and perhaps disallow them from editing.

This can cause issues if the users abruptly disconnect (the flag won't be removed), or if they tend to open a record and walk away.
0
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 250 total points
ID: 39878693
When I have to implement this, I go a step further and log the UserID plus the date/time the "lock" was initiated.  That way, you can identify who has the record locked and how long it has been locked.  I also include a clear locks function that simply runs an update query to remove all the lock flags.  That takes care of the occasions where locks don't get properly removed because of network blips that knock users out.  The lock code also allows the user who has the record locked to come back in and when he leaves, the lock is removed.

I've run into very few applications where users will be updating the same record at the same time.  Usually some outside event triggers the action and so it is really unlikely.  The time when this technique is valuable is when you have a pool of users taking from a queue of work.  This lets people know which records are still in the queue but might already have been started by someone else so my queue list includes the lock info.
0
 
LVL 1

Author Closing Comment

by:machine_run
ID: 39940797
THANKS !!!!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

920 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

11 Experts available now in Live!

Get 1:1 Help Now