On Tue, Jul 23, 2019 at 12:36 PM Ken McGinnis <[email protected]> wrote:

> We could try to lock the exe and that would fail so we would know
> someone else is using the software. However, if that other user is
> working with data in a different folder, we don't care so we do not want
> to lock the exe.
>

Create a dummy table, "InUse" with a a single record in each folder. When
your user goes to use that folder, they try to lock the single record
inside a TRY... CATCH. If it fails, it means they can't do any of the
functions that would require exclusivity.

> The problem is when the 2nd user comes in and needs to lock many
or all files to reindex or other procedures. How can the 2nd user know
that another user is there?

In one of our apps, we have an "Everyone Out!" menu pad where we store all
the administrative functions. The functions there try to use the shared DBC
exclusive and that's the semaphore that they can proceed. No one else can
log into the app until the DBC is released, and that happens when they're
done with their function, or if they crash, so it automatically cleans up.


-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/cacw6n4tyrvbqyp4r3tuodcclpm8gwbos_77z21f2d8gne+o...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to