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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hacking Report on UNC Has ReadOnly Error

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

When running an MyApp.exe written in VFP8sp2 on a network drive via an unc (NOT mapped), I get this error: (note that MyApp.exe is also run at the unc)
"Cannot Update the cursor MyReport, since it is read only"

I did change the report's parent folder's permission by adding user=everyone and giving it full control. That did not help.

Any ideas?

What papers or advice can you recommend for running apps over uncs'?

Thanks, Stanley
 
I hesitate to dive in here.

Why do you think there's a problem with UNC's? Have you mapped that UNC path to a drive letter and had it work properly? You didn't actually say.

If you haven't then I suspect you'll be wasting a lot of people's time and this very simple act of debugging will point you in a better direction.
 
Hi Dan,

>> Why do you think there's a problem with UNC's?
I never said there was a problem with unc's... My issue is a vfp application that works in all cases except for hacking a report file/table. As I said, the whole app is running under over a unc path and there are NO issues with opening tables and crud operations.

Also, it DOES work without issue when running the app from main.prg (not .exe). Running the .exe is what fails.

I have not seen this behavior before and after troubleshooting all I know to do, and as a last resort, I ask here. I always spend a fair amount of effort trying to solve the issue on my own, as most of the time it is much faster as I don't have to wait for replies. But when you're stuck, you're stuck. This issue is my last issue with this project.


>> Have you mapped that UNC path to a drive letter and had it work properly?
If you haven't then I suspect you'll be wasting a lot of people's time and this very simple act of debugging will point you in a better direction.

Yes, in troubleshooting, I mapped the unc to a drive letter and the same issue persists.

Now, do you have any advice on how to solve this?

The last thing I want to do here is waste anyone's time...

Thanks, Stanley
 
Yes, it sounds as if the report is bound into the executable (which is the usual situation). If you want to hack the FRX, it has to exist as a free-standing file. The solution is to exclude the report from the project when you build the EXE, and to distribute it (the FRX and FRT files) separately.

An alternative might be to use COPY FILE to copy the two files out of the executable to a temporary location, and to modify them from there. I've not tried doing that, but I can't see any reason for it not to work.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I second Tore Bleken, it's the most probable reason, even if you USE \\server\share\your.frx the your.frx embedded in your exe would be found first, and is readonly.

As a side note: I also doubt you run the EXE at the UNC, if you mean your exe runs at that server. You run it from there at the client.

Bye, Olaf.
 
Thank you all,

The issue was the reports were INCLUDED in the .exe, which is what Tore, Mike and Olaf suggested... I excluded them and built a new .exe and all is fine. And, I knew they were to be excluded and thought they were... A second pair of eyes or ears goes a long ways...

Thanks again!
Stanley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top