>Scenario: VFP 7 app running on an application server under Terminal Services. We want to copy a file to a user-selected path. RDP is set up to show local workstation drives. Works fine if user selects a path on the server. But if they choose a path on their own local drive, the app hangs at the COPY TO command. Or I shoud say, appears to. It actually works, it just takes bloody forever.
>
>The file in question is an Excel spreadsheet of 594KB. It takes a full fifteen minutes to transfer from within the VFP app. If I open Excel on the server and do a "Save as" to the exact same remote drive path, it takes about 10 seconds.
>
>The VFP code in question looks like this:
>
>
>oLogger.LogMilestone("Copying report query file to " + lcDest + JUSTSTEM(ALLTRIM(selnamelist.sname)) + ".XLS")
>COPY TO (lcDest + JUSTSTEM(ALLTRIM(selnamelist.sname)) + ".XLS") TYPE XL5
>
>
>The results of the LogMilestone line is as follows: (good idea, Doug! <g>)
>
>
>Copying report query file to \\TSCLIENT\C\PROJECTS\CSSTSUPPLEMENTAL\CUSTOMERS\CVC\DEMO FILES\HEAFCRECS.XLS
>
>
>Has anyone encountered something like this? And does anyone have any ideas on a fix?
If you would just try CopyFile function to copy the file as is, would it work?
If it's not broken, fix it until it is.
My Blog