Multiuser or not multiuser

Jim Ault JimAultWins at yahoo.com
Fri Nov 16 11:27:09 EST 2007


There are a few ways to collect the text files, store them, copy them, etc.

Server storage, one location

Server storage, keeping the previous file as backup in case of corruption or
interrupted session.

Storage on users machine, then updating the server version at login.
Storage on server and user computer.


Basically, you are using
reading:
put url ("file:/" & thePathh & theFile) into revVariable

writing:
put revVariable into url  ("file:/" & thePathh & theFile)

This means you can have a variety of ways to define thePathh & theFile since
they are just strings describing the location.

thePathh
C:/Documents/LoginDoc/
theFile
061107_mbenz.txt

  --making copies of files on the same hard drive
  put "C:/Documents/LoginDoc/Users/" into thePathh
  set the defaultfolder to thePathh
  put the files into theFileList
  filter theFileList without "*_*"  --only names containing "_"
  put "C:/Documents/AdminiMe/AllUsers/" into theDestination
  repeat for each fName in theFileList
    put char 1 to -5 of theFile into userName
    put url ("file:/" & thePathh & "/" &  theFile) into fileContents
    --now you have 1 file and 1 file name
    
    put fileContents into url ("file:/" & theDestination & "/" &  theFile)
    if not (there is a folder theDestination) then
      answer "oops => no FOLDER was found at " & cr & theDestination
      exit to top
    end if
    
    set the defaultfolder to theDestination
    if not (there is a file theFile) then
      answer "oops => no FILE was written at " & cr & theDestination
      exit to top
    end if
    set the defaultfolder to thePathh  --for next loop
  end repeat
end mmm

--you could do this with remote path names
--or
--when a user first logs on, save a copy to both the server and user hard
drive

Hope this helps you get started

Jim Ault
Las Vegas

On 11/16/07 1:56 AM, "William de Smet" <williamdesmet at gmail.com> wrote:

> Thanks for your replies,
> 
> A database engine is not what I need because I don't know how to do it. I
> will stick with TXT files.
> If I follow Henks suggestion I will export every users choice as a seperate
> file.
> But how do I collect these?
> I know how to import just one textfile but how do I import more than one
> textfile?
> They will look like this: date_name.TXT
> 
> greetings,
> 
> William de Smet
> 
> 2007/11/15, Henk van der Velden <henk at iglow-media.nl>:
>> 
>> Hi William,
>> 
>> goeiemiddag..
>> 
>> Indeed, the other question is how to approach the multi-user issue in
>> this case.
>> Blocking clients like this can be a bit unfriendly, and it also poses
>> issues when the 'inuse' variable isn't saved properly. You could end
>> up with a completely blocked application.
>> 
>> One approach could be to use a database. Database engines have their
>> own record blocking mechanisms, so one user can't overwrite the
>> record of another user.
>> 
>> Or, if you don't want to setup a database, you could probably create
>> a folder on every day, and have each user add his / her own textfile
>> to that folder. If you put both the username and the chosen lunch
>> into the file, a user could eventually turn back and change his choice.
>> You could create another app that collects all the text files and
>> creates a list out of it.
>> 
>> Kind regards,
>> Henk
>> 
>> 
>> On 15-nov-2007, at 15:56, use-revolution-request at lists.runrev.com wrote:
>> 
>>> Because the app is put on a Server 2003 with XP clients it needs to be
>>> multiuser or not.
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list