Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

743 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

15 Experts available now in Live!

Get 1:1 Help Now