Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing program in memo field and running.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00209599
Message ID:
00209602
Vues:
20
>Hello,
>
>I want to store a program (actually a 'create SQL View definition') with multiple commands in a memo field and then be able to execute it via the runtime module. Executing one program line works, but the multi-line program is trickier. I thought about going through the memo field line by line (checking for ';', etc.) but I was hoping there was an easier way.
>

You can do a couple of things; one would be to store the compiled version of the program in the memor field, extract it to a file, and DO the file that you extract. For the moment at least, the VFP Compiler isn't available from within the runtime environment, so multi-line execution is a problem directly.

You might also take a look at CodeBlock() (you can download it from here on UT) which sets up a line-by-line interpretive environment inside the runtime; it's a bit slow, but very functional. If you can't recompile, can't limit yourself to a single expression that could be interpreted via macro execution, or need looping constructs, this works well.

There's a rumor that some future version of VFP may expose some of the compiler capabilities in the runtime, but it's rumor, and if it's true, when it will be available, what limits there will be, and how it's going to be made available, noone has talked in any detail about it.

>Thanks in advance,
>
>Kevin
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform