I'm working on an app which will often be loaded on multiple PC's.  The PC's 
will access one shared binary file created and maintained by the app.  There is 
no database being used.

The app will open the file and keep it open until it closes.  The app will 
generally be reading the file most of the time, but there will be a large 
update of several records occasionally.

I want to organize my own file locking on this file to prevent other PC's 
writing to the file at the same time.

What is the best way to do this?

Would it be to open the file read-only, and then close and re-open it for write 
access before doing a write?  That appears to have a lot of overhead 
considering that a few thousand records may need to be written which could take 
some time, and it would be nice for other users/PC's to be able to write 
records during this time.

Is this the only option?

Thanks,
Ross.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to