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

Fopen will not open file

Status
Not open for further replies.

lifesupport

Programmer
May 18, 2004
64
US

What situations prevent fopen from opening a file? Thanks
 
I suppose there are a few...

It might be open already
It might be in a folder that does not exist
It might be in a folder where the access rights are limited
It might exist and be read-only

Off the top of my head...

Regards

Griff
Keep [Smile]ing
 
It also might be an invalid file name...

I missed that one earlier

Regards

Griff
Keep [Smile]ing
 
Thanks for the replies. It has been working all along. I made changes elsewhere in the application that shouldn't effect this at all and now it won't open. I checked the path of the file it's opening and it's correct as the file it's looking for is in the same folder as the application.
 
I went and checked the application again today. Today it works within the VFP design atmosphere, but not as an executable.
 
==> I made changes elsewhere in the application that shouldn't effect this at all and now it won't open

If you're making changes elsewhere in the app, and therefore running the app from the IDE, it's possible that the file cannot be opened because it's still open from a previous execution of the app that didn't properly FCLOSE the file. If this is the case, the IDE still may have the file open.


--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Lifesupport,

Today it works within the VFP design atmosphere, but not as an executable.

Again, you'll get a better answer if you tell us exactly what is going wrong. It what way doesn't it work?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top