>Hi all,
>this might be a really easy thing to fix, but i will be damned if i can find it. i am opening a text file with fopen() stepping through with fgets() and at the end doing an fclose().
>all is well here until the second time i run it. fopen() fails as if it is still open in the environment. if i close VFP (6) and start it up again i can run the program though again with a successful fopen(). the VFP environment must still be holding a reference to it.
>i have tried clear all, clear programs, clear resources, clear memory, release all, release all extended to try and remove the reference but to no avail.
>any ideas? it is very tedious close VFP everytime i need to run the program.
>
>Jordan
It sounds like you're not closing a file. Try CLOSE ALL next time it happens. If it does help than you're certanly not closing that file. Maybe file handle gets overwritten before FCLOSE(lnFileHandle) is issued?
--sb--