blah blah blah is here! blah blah » Close

up0down
link

The scenario...
Multi-user, connecting to an MS SQL Server (either Enterprise or Express) database.
Thankfully, at the moment, using Winforms.

Users can access accounts, BUT
If User-1 has Account-A displayed (and might be modifying it),
then User-2 can ONLY get display-mode if they display Account-A (or can get modifiable-mode if they select Account-B or Account-C).

Of course, if User-2 has displayed Account-B, then User-1 only gets display-mode if they try to show Account-B.

My problem...
HOW do I identify this in the database in a form that is self-correcting?

Currently I write a lock-record that is checked before anything is displayed, and is removed when the user moves out of the system or out of that particular window or to another account.

The problem I'm experiencing is that this isn't self-correcting, and if User-1 just turns off their PC, the record remains. And I need a back-door to remove the record and indicate that it's available to everybody again.

Is there a way of providing a lock on a record so that if the process drops out, the database removes the lock.

last answered 3 months ago

1 answers

up0down
link

i cannot help you there but solution around will be:

create table where you will write what is accessed.

i know that is not much help still alternative

Feedback