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

x
?
Solved

Access 2000 / SQL Server Record open on another PC

Posted on 2014-02-21
3
Medium Priority
?
534 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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 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 40

Assisted Solution

by:PatHartman
PatHartman earned 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

782 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