Database on a server

Jeanne A. E. DeVoto jeanne at runrev.com
Sun Sep 15 20:44:13 EDT 2002


At 11:17 AM -0700 9/15/2002, Richard Hillen wrote:
>I made a database using the splash-screen method, compiled it as a
>standalone and put it on a server, so that my co-workes can use it also.
>They should use it reading and writing.
>
>My questions:
>
>1) If one person is working with the stack and another person wants to
>use it also, Is there a method in RunRev to inform this person, that the
>stack is in use?
>
>2) Is there a method to explore, which user is using the stack, so i can
>inform other users, who want to use the stack, that at present "user
>NNN" is using the stack?

I don't have a working script for this on hand, but I'd start with a
preOpenStack handler that checks a custom property of the stack (which
might be called "beingUsedBy" or something similar).

If this property is empty, the handler sets it to the user's name. If it's
not empty (meaning someone's already opened the stack), the handler tells
the user "The stack is in use by [the beingUsedBy of this stack]", and
tries again after a delay.

On closeStack, if the user's name matches the beingUsedBy of the stack, the
closeStack handler sets the custom property to empty to allow it to be used
by others.

Something along those lines.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the Use-livecode mailing list