Solved

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

Posted on 2002-03-12
3
134 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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 64
vb6 connector to mongodb 2 117
using web browser with BING 40 131
Send outlook email from VBS Script 2 42
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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