>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