re Text file database, moving from Mac OsX to windows
drphilippegiraudet
drphilippegiraudet at wanadoo.fr
Tue Feb 8 03:56:28 EST 2005
Hello
Thanks to Robert Brenstein and Klaus Major for their answers.
The question is not an encoding problem and no more a corruption of
data because of simultaneous writing access, because I still only
tested it in mono user access, on windows. I just realise, with what
Robert says that the corruption by simultaneous writing access will be
my next problem ;-)))) ... ;-(
the problem is that when you enter a command line such as
write appointment to file Pathway at
(1001+dayLength*(dayNumber-1)+225+(RoomNum-1)*4001+(AppNum-1)*100-1)
It writes at the rigth place on Mac
and at the wrong place on windows!
I believe it can't be an error on calculation of the first char:
(1001+dayLength*(dayNumber-1)+225+(RoomNum-1)*4001+(AppNum-1)*100-1)
I prefer to suppose it is a quetion of length of the chain I write : if
some chars like return or even tab are not counted , in a 8MB text
file, it makes a great difference at the end of the file.
but now I have another Question: Robert Brenstein, you wrote me :
"You are not handling file access correctly and the file is getting
corrupted because more than single person tries to write to it. Setting
up multi-user access is not so trivial. Using text files is actually
the least optimal. It is better to work along the client-server
approach. This means that there is a central computer designated as a
master of data and each client computer just talks to it and displays
data locally. Alternatively, each computer can maintain its own copy of
the text and sporadically synchronizes with others. But the algorithm
for synchronization can be a real headache."
So if the text file is not the rigth way for handling multi users
database, and that my next problem will be corruption by simultaneous
writing access, may be it is more interesting to ask you what is the
best way to manage databases under Revolution: What is a client-server
approach ? Would SQL be usefull in that case? Heard speaking about
substacks that can save data ( and didn't understand why the mainstack
cannot). is it possible to easily manage Multi Users access to an
external stack? Where can I learn about those, client server, SQL,
External stacks? Is it realistic to try it, if I tell you that I am
already VERY busy...!?
Many thanks for your help
Philippe Giraudet
More information about the use-livecode
mailing list