Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File 'PARENT' does not exist
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00169340
Message ID:
00169345
Views:
19
>In VFP 5.0 I am encountering a problem. I have a cursor called csrGrid built from a SQL. I use this cursor to populate a grid. When the grid is displayed, I have a command button that will export the data from the cursor to an Excel spreadsheet. When you click on the button, I display a common dialog box and let the user select drive, dir and file name of the spreadsheet Here is the problem:
>
>COPY TO &lcExportFile TYPE XLS
>

You may be encountering file naming problems caused by the macro expansion. Instead of what you do now, try using name substitution:

COPY TO (lcExportFile) TYPE XLS

this will remove ambiguities caused in macro expansion by embedding names with multiple '.'s or spaces.

>Let's say lcExportFile equals 'c:\temp\export.xls'. This works perfectly in VFP, but when I create the .EXE and distribute, the users are recieving error message #1, File 'PARENT' does not exist. I changed the COPY TO statement to COPY TO 'c:\temp.export.xls' TYPE XLS and it worked fine in the .EXE.
>
>Any ideas why the macro substitution would generate this error? Thanks in advance for any suggestions or alternatives.
>
>Kind Regards,
>
>Mat Kennedy
>Decision Support Technology Inc.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform