| | |
Random shared file access details.......
![]() |
•
•
Join Date: Mar 2005
Posts: 32
Reputation:
Solved Threads: 0
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.
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
- problems with reading random access line from a file (C++)
- Forms in Random access files (Visual Basic 4 / 5 / 6)
- VB 6.0. Creating a file for random access (Visual Basic 4 / 5 / 6)
- Printing file access permission.... (Shell Scripting)
- Error in Shared Microsoft Access (MS Access and FileMaker Pro)
- Deleting from Random Access File? (VB.NET)
- unable to access random lines within a file (C)
- how willl i be able to save a specific record into my database file in ms access (Java)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Assistance needed with graphics to be used in database.
- Next Thread: Access Sub switchboard password protection
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





