Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Code from memo field
Message
From
11/02/2000 14:40:45
 
 
To
11/02/2000 14:07:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00330914
Message ID:
00330965
Views:
11
>I have an app in VFP6 that is updated via email. I have about 25 tables to update and rather that have 25 seperate programs or one big program with 25 case statments, I set up a table to hold the names of the native tables, the names of the imported tables, the index expressions, the relation expressions and the update expressions.
>
>I capture these in variables and then execute the command from a macro: ie
>lcUpdate_exp=ie_tables.update_exp
>&lcUpdate (where the code in the update_exp memo field would be something like:
>REPLACE mytable.ord_qty with importtable.ord_qty... etc)
>
>Here is the problem: some of the code (but not all) produces errors -
>"syntax error" or "illegal command" However, when I take the code and put it into a program, it compliles and runs without error. When I put the code back into the memo field, I get an error.
>
>Why? Anybody run into this?
>

Macro-execution is limited to a singleline of executable code; things get squirrelly in memos.

If you're running VFP6, why not extract the memo field content to a file using STRTOFILE(), compile the resulting file using the COMP:ILE command inside the runtime, and run that? This capability came in with the SP3 update.
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
Reply
Map
View

Click here to load this message in the networking platform