944,147 Members | Top Members by Rank

Ad:
Jul 3rd, 2005
0

Random shared file access details.......

Expand Post »
I always open a file just before it it written to, then close it as soon as practical. I have always wondered what would happen in this scenario:-

Your program is on a server and two people use a shortcut from their stations to run it. All the file access in the program is set to "random shared". One uses the program to change record 10, but at almost exactly the same time the other person does the same. The first person is using a feature that has 100 lines of code to do after the file is opened and before the "put" statement is executed. The second person is using another feature of the program, but once the file has been opened only ten lines of code need to be done before the "put" statement. The question is which "put" statement will change the file first. Does the "random shared" form of access allow some sort of queing at system level, or would the second persons info be put in the file, then get swiftly overwritten by the first persons new info.

I know the file could be opened for "random lock write", but I have often wondered about the above scenario.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
MrConfused is offline Offline
32 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Assistance needed with graphics to be used in database.
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Access Sub switchboard password protection





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC