>Hoi peter,
>
>This behaviour also exists with classes in classlibs. If you execute a script with EXECSCRIPT(), it can't find any classes in the executable if not already loaded.
>
>The trick I used is to have a DOCMD() function in the exe, so you can can call DOCMD([x=CREATEOBJECT("Myclass")]). This is because from the script I go back into the executable through the DOCMD() function. Of course the DOCMD function is very simple like
>
>
FUNCTION Docmd(cCommand)
>&cCommand
>RETURN
>
>So your problem can be solved if you've got a DOCMD() function in your startup prg, and call:
>
DOCMD("select * from tableX into cursor whatever")
Another trick you can do this way is to
private param1, param2, pcScript, plRet
docmd("plRet=execscript(pcScript, param1, param2)")
This way you aren't limited to running a single command.