Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 7 bug on SET RESOURCE command
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00657030
Message ID:
00657533
Views:
47
>>>From the documentation:
>>>
>>>"Issue SET RESOURCE TO without a resource file name to open the default Foxuser.dbf resource file. Issuing SET RESOURCE TO performs an implicit SET RESOURCE ON."
>>
>>George, thank you for reply.
>>
>>Look carefully to the last two lines:
>>
>>SET RESOURCE TO
>>
>>sets the resource to some foxuser file.
>>
>>In this case, previous resource file (ressurss.dbf) table must be released and can be used by USE command or by any other application.
>>
>>However last line
>>
>>USE RESSURSS causes error. This means that when RESSURSS.DBF is
>>used as resource file,
>>
>>SET RESOURCE TO
>>
>>COMMAND DOES NOT RELEASE RESSURSS.DBF file.
>>
>>This is related to the ressurss.fpt file structure. This
>>fpt file confuces VFP 7 so that it does not release it after SET RESOURCE TO
>>command.
>>
>>THIS IS BUG !
>
>First, I do not appreciate your shouting at me and, therefore, may be a little more blunt and a little less tactful than usual.
>
>In order for this to be a bug it must be replicatable with any valid resource file
>
>It is not! I've tested the following over and over and have not been able to replicate it. My normal resource file is differently named than the default. The code below which I've used to do these tests has not once demonstrated the behavior you describe.
lcresource = SET("Resource" , 1)
>* lcresource equals C:\FOX\VFPUSER.DBF
>USE (lcresource) AGAIN IN 0 ALIAS myresource
>USE
>SET RESOURCE TO
>* The following prints C:\WINNT\SYSTEM32\FOXUSER.DBF
>? SET("Resource" , 1)
>USE C:\FOX\VFPUSER.DBF
>USE
>SET RESOURCE TO (lcresource)
I have done this both with and without using the resource file again.
>
>It is to no one's advantage to start yelling "BUG!" without being able to categorically prove and replicate it. In fact, it does a disservice to the community as a whole. The mere fact that it cannot be replicated with any valid resource file dis-proves your statement.
>
>SET BUG OFF

George, to to the following typical situation:

1. I have a config.fpw file with

resource=RESSURSS

line included.

2. This config.fpw file is included in vfp 7 application .exe file.

3. VFP application crashes with one of the C5 errors reported previosuly and
resource memo file gets corrupted.

4. In next run, vfp asks:
The resource file is not valid.
Overwrite it with a new empty one ?

5. You may answer to Yes or No, no matter.
It will continue to ask so for every run.

Isn't this a bug ?

6. It does not allow to repair the corrupted resource file.

James Sounders wrote:

Apparently, the file gets partially opened in the system datasession
when doing the SET RESOURCE, and does not get closed until you exit and
restart VFP.

So it is IMPOSSIBLE even to fix resource file corruption in my code if
config.fpw file with resource file setting is included inside .exe file.

I receive a lot of support calls about this issue.

If this is not a bug, is it behaviour by desing ?

To fix this, I must open a resource file manually at my exe startup and
issue a pack or some other command to dedect memo file corruption and to fix it.

Do you really think that this is the good way ?
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform