Solved

Access 2000 / SQL Server Record open on another PC

Posted on 2014-02-21
3
478 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
Comment Utility
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
Comment Utility
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
Comment Utility
THANKS !!!!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 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

7 Experts available now in Live!

Get 1:1 Help Now