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

Can I disable GETFILE() when I get an error?

Status
Not open for further replies.

JaneJantz

Programmer
Sep 13, 2000
55
0
0
US
Is there a way to disable the GETFILE()utility when I trigger an error (no table in use)? I sometimes lose the workspace for some reason and when trying to return to a specific workspace, the file has been closed. It then pops up getfile() and they can see all the files in the folder. From this screen they can delete files. I would like to disable that function. Any way?
 
Wow! Thanks Dave... that works great in version 9... is there any way to do that in version 6 (as I have not converted all my users to 9 yet.
 
Rather than worrying about suppressing the getfile() box have you tried to solve the root issue?

It seems to me that maintaining the data/working environment would resolve your issue and be the correct way to approach this.

 
That would be a good approach yes... to solve the root issue. I guess I am just not as good a programmer as some people. Hopefully, I can keep learning... only been at this for almost 40 years now.
 
I'm sorry if my reply came across as harsh.

Given the information you have provided the environment management seems to be the real issue. That said, could their be a reason outside of programmer control that causes these issues? Sure. But I have to reply based on the information in the post their is no way to know if you are an experienced programmer dealing with one of those odd issues that won't go away or a new programmer taking the wrong track for solving an issue. That's why I asked if you'd tried and commented that I felt that was a better way to attack the problem.


Alan
 
I run a hosted application over 10 servers, each having 200 users. I have over 100 businesses across the US and Canada that use my software. I update the servers about once a month with changes and sometimes have been known to make a mistake. The software consists of over 3000 modules now... some written originally in FOXPLUS over 30 years ago, but I have managed to keep things going. I dont have the luxury of totally re-writing it because of it's large customer base.
I have tried to keep up with FOXPRO and VFP thru the years, and really appreciate the way it has served my needs. I love this forum, as I have watched it grow since "compuserve". I guess I am getting a little crotchity in my old age. I dont see myself as a "super" programmer... just a hard-working one.
I am moving everyone to VFP 9 this week. So, in case an error should occur, one user cannot browse all files on the server and delete at will. This is what happened. So I was very happy to hear VFP 9 had a solution for me.

Just a very old fox programmer......
 
That give some scope, I can see how workspace could get lost in that kind of system.

Have you wrapped your use commands in a common function/program or are they just inline where you need them?

If you've wrapped them in some common code you could add a "if file()" before the actual use and throw and error rather then letting the use occur.

Alan
 
Yes, I do have that in place. It was an honest, clear cut, bug. I am trying some new printing practices on the hosted platform. I did not fully test one place in the code that stepped out of procedure. I have fixed the problem. But I am anxious to prevent it from ever happening again. Moving to VFP 9 will help the most.
 
It is perfectly possible to get the tableprompt (unless you turn it off) even without programming errors once in a while.

I have an application that uses a thirdparty ocx to make thumbnails of photos and the like - if the image file is very large or needs to be rotated, the system can sometimes lose access to its data environment, a memory issue I think, and after closing the open image file it is unable to
skip to the next record in the data table - not because the work area has changed (so scan...endscan doesn't help), but because ALL the underlying data tables have been 'forgotten'.

I trap this and reload the app. but what I am trying to say is even with good coding, once in a while VFP may want to offer up a tableprompt - so don't worry!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top