>>>I am accessing a file with FOPEN().
>>>
>>>During development if there is an abnormal termination procedure cannot be run again because file is in use. How do I close that file if I no longer have the file handle?
>>
>>According to HELP
>>CLOSE ALL also closes low-level files.
>
>Thanks Borislav. Is there another way other than the nuclear option? That would totally reset the development environment.
You can log FOPEN to some text files. Unfortunately you must put the first 3 lines everywhere you have FOPEN, or if you use some global header file put them in it:
IF _VFP.StartMode == 0
#define FOPEN FOPENEX
ENDIF
? FOPEN("d:\all_zapl\path.ini",12)
FUNCTION FOPENEX(lcFileName, lnMode)
LOCAL lnHandle
lnMode = IIF(TYPE("lnMode") # "N",0,lnMode)
lnHandle = FOPE(lcFileName, lnMode)
STRTOFILE(lcFileName+"~"+TRANSFORM(lnHandle),"d:\openedhandles.txt")
RETURN lnHandle
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.