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:
00657718
Views:
29
George,

My problem is as follows:

How to dedect resource file corruption so that it can be replaced afterwards ?

My current solution is as follows:
IF FILE('Resourceisbad')
  * Replace corrupted resource file
  * savedresource is included in exe file.
  COPY FILE savedresource.dbf TO myresource.dbf
  COPY FILE savedresource.fpt TO myresource.dbf
  DELETE FILE Resourceisbad
  ENDIF
    
LOCAL lerror
lerror = .f.
ON ERROR lerror = .t.
SET RESOURCE TO myresource
ON error
IF m.lError
  MESSAGEBOX('Resource file is corrupted. Re-start application to repair' )
  FCLOSE( FCREATE( 'Resourceisbad' ))
  QUIT
  ENDIF
However, I want to specify resource file in config.fpw file using RESOURCE=
command. It seems that it this not possible in VFP 7 because this disables ability to fix corrupted resource file.

Can you recommend me some some solution ?
Andrus
Previous
Reply
Map
View

Click here to load this message in the networking platform