main logo
Subject: re: Execscript glitch?
Author: Joe Yoder
Posted: 2007/11/30 20:36:44
 
View Entire Thread
New Search


Thanks Gianni and Lew,

I guess that's one reason to use Execscript instead of macro
substitution. I was trying to figure out if there were any advantages
beyond the elegance of a one liner.

I went back to the help but didn't find anything to indicate that an
array created there would not be accessible in the following code. Is
there a clue I am missing or am I just supposed to know??

TIA - Joe

On Friday, November 30, 2007 7:03 PM, Lew wrote:
>
>Date: Fri, 30 Nov 2007 19:03:26 -0500
>From: Lew
>To: profoxtech At leafe DOT com
>cc:
>Subject: RE: Execscript glitch?
>
>Your array will have been created as a local memvar within the script, so it won't be around when the script
>finishes. Play around with the parameters idea then
>local myarray[1]
>execscript(cScript,@MyArray)
>HTH
>
>-----Original Message-----
>From: profox-bounces At leafe DOT com [mailto:profox-bounces@leafe.com] On Behalf Of Joe Yoder
>Sent: Friday, November 30, 2007 6:39 PM
>To: profox At leafe DOT com
>Subject: Execscript glitch?
>
>I just coded an SQL select statement using execscript and found it won't create an array. If I substitute
>"cursor" for "array" all is well. _Tally after code execution reports the correct value so the SQL apparently
>runs but does not create the array. When I use macro substitution the array is created as expected. Does
>someone have an explanation for this behavior?
>
> TIA - Joe
>
>Here is the code:
>?EXECSCRIPT('select CNT(*),' + m.fldstr +;
> " DISTINCT FROM (m.InTbl) WHERE desthop > 0 and not INLIST('out'," +;
>
> m.fldstr + ' ) GROUP BY ' + m.fldstr + ' INTO array Rarray')
>
>?_tally
>
>
>--- StripMime Report -- processed MIME parts ---
>multipart/alternative
> text/plain (text body -- kept)
> text/html
>---
>
[excessive quoting removed by server]


 
©2007 Joe Yoder
<-- Prior Message New Search Next Message -->