Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy memo fails if file exists
Message
 
 
To
06/06/2011 13:28:45
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01513136
Message ID:
01513155
Views:
49
>>Hi everybody,
>>
>>I have the following line of code
>>
>>copy memo contents to (lcFile)
>>
>>I found that it fails for the regular user if the file already exists in the directory. The user does have read-write access to the parent directory (and I assume to all its children?).
>>
>>Do you find this to be the case for you as well and what will be the solution?
>>
>>Thanks in advance.
>
>Try SET SAFETY OFF, maybe that helps?

No, it didn't help. I also added code to delete the file (ERASE (m.lcFile)) if it already exists and now I'm getting 'File Access denied' on this line of code.

So, assuming that this file originally inherited hidden (or read-only) attribute of the directory and was not changed, is there a way to overwite the file with Copy memo command (or any other similar command) without first trying to change the file's attributes?

We're getting the similar problem with FoxUser and also I don't know in how many places we're getting this error, so I'd like to have the universal solution.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform