<< I only want the file not writable by another PC while a record is being written. When I'm finished writing a record, which may take a few milliseconds, I want others to be able to write to the file immediately afterwards. >>
Ages ago I had a similar requirement and the solution was both simple and functional. Just set a "It's my turn - get lost" flag. When nobody is writing the flag is false. The first person who starts to write sets the flag to true and he is allowed to write, the others who want to write see the flag and keep testing it until it becomes false again when the first writer has finished, ad infinitum. You just need to consider what to do if two people try to write at exactly the same moment. In practice I was never troubled by this, one always got there first, but if this is a concern you could easily set up a queue and assign priority rank to the user's (more likely their computers). -- Regards, Tony Foale EspaƱa / Spain www.tonyfoale.com [EMAIL PROTECTED] _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

