EXE produces different results than running source code

Hi All:
I have a program that reads a table using a DO..WHILE loop. For each record, there is code that copies a filename (of a BMP file) that is in a field to a temp file using a COPY FILE statment. The temp BMP file is then used on a report, and the report is run for each record. If I run the source code, the COPY FILE statements and the reports are correct but when the EXE is run, only one COPY FILE statement seems to happen and the same picture appears on every report. The client using the EXE discovered the problem. Everyone is using Windows 7.
Any ideas would be appreciated.
Thank you,
Cathie
NYC
ramramcatprogrammerAsked:
Who is Participating?
 
ramramcatConnect With a Mentor programmerAuthor Commented:
The problem seemed to be due to repeatedly overwriting the image filename that was used in the report, apparently Windows-7 and/or Server does not allow overwriting by an executable. Anyway, I resolved the problem by placing a function in the report to load the (original) image file. Thanks for your help.
Cathie
0
 
pcelbaCommented:
If the printed images do share one common name then it is possible VFP uses cache for it so just the first image is printed.

Try   CLEAR RESOURCES  <image name>   before each report run. More info about this command is in VFP help, the latest help is available on Github: https://vfpx.github.io/projects/
0
 
pcelbaCommented:
Are you saying the COPY FILE did not produce any error but the target file was not overwritten? What was the target folder?

How did you find the file was not overwritten at all? Was the size and/or checksum unchanged after the COPY FILE command?

Did you try  CLEAR RESOURCES  command?
0
 
ramramcatprogrammerAuthor Commented:
See above solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.