>>It seems that VFP
>>
>>set resource to
>>
>>command leaves resource file open sometimes.
>>
>>Steps to reproduce:
>>
>>download
www.eetasoft.ee/resobug.zip file for ressurss.dbf/fpt database.
>>
>>Run the following program:
>>
>>
>>use ressurss
>>use
>>
>>* Next line causes error: memo file is missing or invalid. Why ?
>>SET RESOURCE TO ressurss
>>
>>SET RESOURCE TO
>>
>>* Next line causes error "File is in use."
>>* Why ? IS this VFP bug ?
>>use ressurss
>>
>
>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 !
Andrus