Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

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

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
Gmoney
Asked:
Gmoney
  • 2
1 Solution
 
RemCommented:
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
 
VKCommented:
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
 
RemCommented:
Thanks for the points, and glad to have been of help.

Bye

Rem
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now