I've come up with a simple solution to this problem which, while it may not
fit all situations, it requires very little code and no database connection
or form eep coding.
 
When you use an icon to startup your application on a network and you don't
want multiple sessions of any one db application at each workstation, add
this code to your startup.dat file specified in your desktop icon;
 
--startup.dat
--your settings, code etc.,
 
set v vchkfile int=null
set v vchkfile=(CHKFILE('C:\YourApp.txt'))
if vchkfile=1 the
  pause 2 using 'YourApp is already running !' caption 'Startup Terminated'
icon stop
  goto EndApp
endi
Out c:\YourApp.txt
wri 'Your Application Name'
out screen
 
--more code
 
connect YourApp
--more code
 
edi using startmenu
delete c:\YourApp.txt
return
 
label EndApp
ret
 
Thus, if your app is running and you try to start a second instance, the
code for chkfile stops it and closes before the 2nd instance starts.
If the app stalls and you need a 3 finger salute to Task Manager, the
remaining code after 'edi using startmenu'  deletes the YourApp.txt file.
 
No matter which user logs in at the workstation, the file gets written to
the root of the local machine's c:\ drive, so it is user independent.
If their is a powerdown situation, it will not delete the YourApp.txt file.
You will have to put an icon titled something like "Clear Application" on
your desktop which calls a batch file which deletes the YourApp.txt file. 
 
You can repeat this process for as many applications you may have available
at each workstation.
 
Try it out.
 
 
Bill Eyring


  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Frank Taylor
Sent: Thursday, October 30, 2008 9:45 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Mult-iusers, Multi-sessions, Mult-iPCs



Peter

 

Yeah I had the same problem with table locks, so this has worked quite
well..  Rinstancecount comes with the R:Base power pack that has a lot of
other useful RBL's and was not that much money. Talk to John to get the
pack..

 

Frank Taylor - Information Technology Administrator

F.J. O'Hara & Sons, Inc - Araho Transfer Inc.

Boston, MA - Rockland, ME - Miami, FL

Direct Dial - 617-790-3093

email: [EMAIL PROTECTED]

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Peter J.
Ryan
Sent: Thursday, October 30, 2008 10:29 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Mult-iusers, Multi-sessions, Mult-iPCs

 

Frank

 

This idea works nicely. It also solves the problem of a user that crashes
out of a session (powered down, task manager, outage etc).

When a table is used to verify in/out for the session and the user crashes
out they become locked out of the application  upon a valid return to it  --
an issue I am trying avoid.

 

Thanks for the idea! 

 

Peter 

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Frank Taylor
Sent: Thursday, October 30, 2008 7:22 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Mult-iusers, Multi-sessions, Mult-iPCs

Peter,

 

We use the RBase Plugin Rinstancecount.rbl to limit the users from opening
more than 1 Session of R:Base at a time on their machines.  

 

Basically we look to see if there is another rbase session open, and if so,
put a self timing form up saying the user already has a session of rbase
open and then it exits.  Here is a sample code of how we do that.  Also I
use the Cval ('computer') to allow certain machines to have multiple
sessions (like myself)

 

   IF gcomp NOT IN ('OHARA235-ADMIN','OHARA234','OHARA267') THEN

         PLUGINS rinstancecount.rbl vrbg76|rbg76.exe

         IF vrbg76 > 1 THEN

               EDIT USING multiplealert

               EXIT

         ENDIF

   ENDIF

 

The rinstancecount.dll will also work with other programs and code, which
makes it nice in limiting the user from opening stuff you don't want them
to.

 

n  Frank

 

Frank Taylor - Information Technology Administrator

F.J. O'Hara & Sons, Inc - Araho Transfer Inc.

Boston, MA - Rockland, ME - Miami, FL

Direct Dial - 617-790-3093

email: [EMAIL PROTECTED]

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Peter J.
Ryan
Sent: Wednesday, October 29, 2008 4:36 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Mult-iusers, Multi-sessions, Mult-iPCs

 

We have several computers in a common counter area.

Users loggin to apps to assist customers.  Sometimes at their own desk 

Sometimes at the counter. Often at both places all day long.

 

I am trying to find a way to limit the use of the same database being opened
more than once on the same

PC. Timeout option doesn't seem to be the issue -- its preventing the start
of a session that already opened.  

(Re-training users and/or replacing the staff is an option desired but -- I
really can't consider it now.)  

 

I guess mystartup.dat is missing sometime. Suggestions? 

 


_______________________________________________________________________
This Email has been scanned for all viruses by PAETEC Email Scanning
Services, utilizing MessageLabs proprietary SkyScan infrastructure. If you
need assistance, please contact the Systems Administrator, Frank Taylor at
[EMAIL PROTECTED] - 617-790-3093. 
** REMEMBER NEVER OPEN AN ATTACHMENT UNLESS YOU ARE SURE OF IT'S CONTENT AND
SENDER **
_______________________________________________________________________


_______________________________________________________________________
This Email has been scanned for all viruses by PAETEC Email Scanning
Services, utilizing MessageLabs proprietary SkyScan infrastructure. If you
need assistance, please contact the Systems Administrator, Frank Taylor at
[EMAIL PROTECTED] - 617-790-3093. 
** REMEMBER NEVER OPEN AN ATTACHMENT UNLESS YOU ARE SURE OF IT'S CONTENT AND
SENDER **
_______________________________________________________________________

Reply via email to