
Running a MemoExecDQL from a MemoExecDQL
Running a MemoExecDQL from a MemoExecDQL
One more problem that I dont understand ( Im afraid its again me)
I use this command in an Action (on a button). There it runs without error..
retval := MemoExecDQL( any AADQLStore with DQLNr=151 DQL, data-entry field1, data-entry field2 , data-entry field3 , data-entry field4 , concat("file:", GetCurrent("AppPath"),"\Print\SR_", data-entry field2 ,".html"),Body) .
When I call it from an MemoEcecDQL with reval := in front I get the following error:
Any idea?
Thank you for your help. Have a nice weekend.
Re:Running a MemoExecDQL from a MemoExecDQL
Hi Thomas.
1. You say that this works on an Action on a button….
retval := MemoExecDQL( any AADQLStore with DQLNr=151 DQL, data-entry field1, data-entry field2 , data-entry field3 , data-entry field4 , concat("file:", GetCurrent("AppPath"),"\Print\SR_", data-entry field2 ,".html"),Body) .
I assume that something else works on a button, because this would not ;-)
However it looks like something you would call in a DQL.
It is not magic. What you have to remember it that ExecDQL is just bridging RT and Programming. You run what used to be a DT thing (script) interpretive in RT.
When you use MemoExecDQL it expect to be fed a Memo (buffer) as input. This can be a local MemoField in a for one you lookup in DQL.
But the rules are the same as for any other Memo.
retval := MemoExecDQL( any AADQLStore with DQLNr=151 DQL, data-entry field1, data-entry field2 , data-entry field3 , data-entry field4 , concat("file:", GetCurrent("AppPath"),"\Print\SR_", data-entry field2 ,".html"),Body) .
Here I dont have the entire DQL but for instance if Body should work her (which is the one you have problem with) it would need to be part of a Table that is directly listable.
For ExecDQLStore with DQLNr=151 ;
retval := MemoExecDQL(DQL,data-entry field1,data-entry field2, data-entry field3,data-entry field4, concat("file:", GetCurrent("AppPath"),"\Print\SR_", data-entry field2 ,".html"),Body) .
Where both DQL and Body is stored in the ExecDQLTable.
You on the other hand have decided to use any and with the same assumption that body is also stored in AADQLStore then the syntax is.
retval := MemoExecDQL( any AADQLStore with DQLNr=151 DQL, data-entry field1, data-entry field2 , data-entry field3 , data-entry field4 , concat("file:", GetCurrent("AppPath"),"\Print\SR_", data-entry field2 ,".html"),any AADQLStore Body) .
So the only problem here is again…You ;-)
Everything is normal DataEase expect that you execute the content of a memo and use the content of a memo as formatting rather than simply listing it etc.