Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editor displays 'File access is denied' and ignore changes

Status
Not open for further replies.

agharib

MIS
May 16, 2004
5
US
We have been having the following problem with VFP editor (9.0) - I am not sure if it existed before 9.0.

If a user opens a PRG file (on a network drive) for editing, then another user tries to open the same file, the second user gets the message:

File access is denied <Filename>.

If the second user was trying only to view the PRG, and typed:

MODIFY COMMAND <FileName> NOMODIFY

the file gets open in Read Only Mode. While the PRG still open by the second user (ReadOnly), if the first user made any changes to the PRG and tried to save the file (Ctrl-S) or Save and Close (Ctrl-W), he/she gets the message:

File access is denied <Filename>

and the file goes away/gets closed (!) discarding all changes made to the file! - no option to save to another file name!

Has anyone encountered this problem?
Any trick to get around it?

To replicate the problem:
- Open VFP and edit any PRG file
- Open another VFP session and try opening the same file. You will get File access is denied ... message
- Try open the file again with (in the second VFP session) with NOMODIFY option - it opens ReadOnly.
- Make changes to the file opened in the first session, then try to save!

Adel
 
"File access is denied <Filename>."

That should come as no surprize.

It is no different than someone opening a MS WORD document for editing and another individual attempting to open the same document at the same time.

When VFP opens a PRG (or any other file type) for editing no one else can open the same file for editing.

Good Luck,
JRB-Bldr
 
I agree; the second user should not be ble to do anything but viewing the file. The issue is with first user; he/she has control of the file, and they should be able to save; they could not.
Not only that, but VFP also discards the changes made and closes the file w/o any gracefull alternative!

Adel
 
I guess that I have never encountered a situation where one developer got the File Access Denied warning and was still allowed into the file.

Whenever I have gotten that, my Access was Denied and I was not able to open an Edit window.

Therefore the changes made by the individual who was performing the original file edit were saved.

I can't find any settings in my VFP options that would allow any 2 users to open the same file (for editing or not).

In general, the 2nd users should be informed that if they get a File Access Denied message, quit trying to get into the file.

Maybe someone else has a better answer on how to prevent the problem in the first place.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top