File Locking a Text File on a Network Drive
I haven't figured out how to successfully implement file locking, and hope someone has ideas on how I can do it.
I've got a text file on a shared drive that anyone can access through a VB program I've authored. What we've seen is that if someone is already in the text file (such as me testing new functionality!), someone else will submit data to the text file through the program, but their changes are lost (because someone is already in the file).
An example of what I'm looking for is how Microsoft handles Word or Excel files. If someone is already in a file and another user tries to open it, they receive a message stating the file is in use and that they can view it as read-only or be notified when the file is available.
Does anyone know of a good solution to this problem?
Thanks in advance for your help!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center