Solved

Access 2000 / SQL Server Record open on another PC

Posted on 2014-02-21
3
492 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 35

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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