I have inherited the following code. I use VFP 7 SP1.
lcReportFile = SYS(2015)+".tmp"
REPORT FORM INVOICE TO FILE (lcReportFile) NOCONSOLE
nTotPages = _PAGENO
IF FILE(lcReportFile)
DELETE FILE (lcReportFile)
ENDIF
The above code is called in a loop from another procedure, it simply gets
the data for the current invoice that will be printed and determines the
total page count for the report. The invoices are printed once a day in a
batch normally a batch is 50-60 invoices. Maybe once a month or it may be
as long as 2 months the user receives error 1705 File access is denied on
the DELETE FILE (lcReportFile) line.
Is there anyway to force the file to be release from the REPORT FORM
command? I assume that is what is holding it open.
Thanks
Tom