Solved

How to determine if a LAN user is editing the current record

Posted on 2002-03-12
3
136 Views
Last Modified: 2010-05-02
Is there a way to tell if myself and another user are editing the same record across a LAN? I am using the Data control.
0
Comment
Question by:Gmoney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Rem earned 50 total points
ID: 6859835
Yes,

If you're using pessimistic locks, you won't be able to update.

Try to avoid this situation though. It's fairly easy to add a field (flag) set to 'true' when a user opens the record. Once this flag is 'true', no second user can open the record if your query specifies the value of the flag.

Bye

Rem
0
 
LVL 6

Expert Comment

by:VK
ID: 6859886
Hello Gmoney !

Yes there are different ways depending on your configuration: OS, Database, ....

If your Database supports locking single records like
SQL-Server 7.0 or higher for example you haven't much to do.

If your Database doesn't support single record locking.
Access for example locks 2K pages an cannot lock single records. So you will get a conflict although the 2 users are editing different records if the pages have an intersection.

An approach would be having an extra locking table where you store the current lockings. However you have to do some clean-up process if you find 'too' old lockings.
They could have been remained after system crash or abnormal program termination.

V.K.
0
 
LVL 3

Expert Comment

by:Rem
ID: 6860874
Thanks for the points, and glad to have been of help.

Bye

Rem
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

623 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