Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: how to stop user from Re-Login
Thread ID: 330907 Message ID: 331217 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Projects and Design
Date: Tuesday, December 27, 2011 11:19:20 PM         
   


> >
> >
> > Well it doesn't have to know. You create a timer that constantly replaces the logical field of the current user into .T. into an interval of let us say 1 minute. Same timer should also reset all the values of that logical field into .F. (except with that of the current user) for let us say every 5 minutes. That is almost the same approach I used in creating a list of onlines on my end.
> >
>
> But then the logged-in-users list would be somewhat flaky, wouldn't it? Say if there are 10 or 50 clients being actually "logged in", each local user's being-online status would be set to true once per minute but also being reset 10 or 50 times in the same period, so user X would be seen as being online for 6 or 1 seconds per minute although s/he is actually online all the time.



>
>
> > And how, may I ask, does FCREATE() solves the issue of improper shutdown without the need to restart the unit acting as the server? Or are you implying that the file is to be created locally?
> >
>
> Sure you may :-) In my experience, RLock() and FCreate() just works in practice, we used to use that approach in relatively big networks, up to 100 users, no problems.
> As a guess, the O/S file system might be smart enough to get possibly-crashed-client issues sorted, at last in most cases. Vfp's built-in table/row locking mechanisms basically seems to be using low-level file system features too, so that there may be hundreds or even thousands of lock/release operations per minute in a busy network, and while I often heard and read about data corruption issues with DBC/DBF databases, I rarely or even never heard about having-to-restart-file-server issues because of dangling lock handles caused by crashed clients.
>
>
>
> hth
> -Stefan

In my test just now, it appears that the low handle onto that file is linked to the process that creates it. So when it is is released properly or improperly, the low level handle is likewise released. VFP is indeed very smart in this case as compared to other PL I have tried before where when a low-level function like FCREATE() is used, the lock on that file won't be released until you restart the unit or issue an FCLOSE() on the same process.

http://sandstorm36.blogspot.com
http://weblogs.foxite.com/sandstorm36/default.aspx

ENTIRE THREAD

how to stop user from Re-Login Posted by mk sharma @ 12/24/2011 11:22:10 AM
RE: how to stop user from Re-Login Posted by Vivek Deodhar @ 12/24/2011 12:20:24 PM
RE: how to stop user from Re-Login Posted by mk sharma @ 12/24/2011 12:31:54 PM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/26/2011 3:27:48 AM
RE: how to stop user from Re-Login Posted by mk sharma @ 12/26/2011 7:13:14 AM
RE: how to stop user from Re-Login Posted by Stefan Wuebbe @ 12/26/2011 10:43:52 AM
RE: how to stop user from Re-Login Posted by mk sharma @ 12/26/2011 12:04:10 PM
RE: how to stop user from Re-Login Posted by Anil Sharma @ 12/26/2011 12:09:51 PM
RE: how to stop user from Re-Login Posted by mk sharma @ 12/26/2011 12:23:46 PM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/27/2011 5:56:27 AM
RE: how to stop user from Re-Login Posted by Anil Sharma @ 12/27/2011 8:40:33 AM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/27/2011 11:30:17 PM
RE: how to stop user from Re-Login Posted by Stefan Wuebbe @ 12/26/2011 6:29:48 PM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/27/2011 5:34:38 AM
RE: how to stop user from Re-Login Posted by Stefan Wuebbe @ 12/27/2011 10:10:50 AM
RE: how to stop user from Re-Login Posted by Vivek Deodhar @ 12/27/2011 10:37:58 AM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/27/2011 11:27:56 PM
RE: how to stop user from Re-Login Posted by Jun Tangunan @ 12/27/2011 11:19:20 PM
RE: how to stop user from Re-Login Posted by anand kulkarni @ 12/26/2011 3:57:11 AM
RE: how to stop user from Re-Login Posted by Stefan Wuebbe @ 12/26/2011 10:38:35 AM
RE: how to stop user from Re-Login Posted by mk sharma @ 12/26/2011 12:02:01 PM