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

Cannot create file error 2

Status
Not open for further replies.

davisonpro

Programmer
Oct 11, 2010
34
US
Hello!
I'm new here so please be gentle. I have tried multiple searches of this forum to look for answers before this posting but, I didn't find anything that related to my issue. If I missed it, please excuse me.

I am taking over the development of an app written in VFP v.7 (planning to move it to v.9 soon). The app has been running successfully for more than 10 years.

My question: How do I avoid the "Cannot create file" error when the app starts?

The odd thing is that we are not attempting to create any file at all - there is no code for me to post here because there is no code in the app that attempts to create any file on startup.

I am told that this error started happening a few years ago and our experienced user base knows to simply click "Ignore" and there is no problem. But, we want to expand our user base and that is not very confidence inspiring for new users to see this error every time they start the app.

Thanks!
Al
 
Hello DavisonPro, and welcome to the forum.

There are several possible causes of this problem. One possibility is that the application is trying to create a "resource file" behind the scenes. A resource file is actually two files FOXUSER.DBF and FOXUSER.FPT.

If that's the case, you can avoid it by putting this line in your Config.FPW file:

RESOURCE = OFF

A Config.FPW file is a small text file, which is usually in the same directory as your applications's executable file. If you have such a file, open it in a text editor, and add the above line to the end of the file.

If you don't already have a Config.FPW, use a text editor to create one, and then add the above line to it. You will need to distrubute the file to all your users; have them put it in the same directory as the executable.

If that doesn't solve the problem, don't worry - there are other possibilities, but we will need to ask you for more information. Give it a try, and report back.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
I think Mike is most probably right.

I would add that you could check that the folder your app is starting up in has full read-write access for the user in question.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Thank you for the replies!

I just checked and we don't seem to be using a CONFIG.FPW so, I will create one to send out with the next update.

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top