You're assumption was right, creating a manual 
PRG of that line of code will not compile.

Interestingly, the error msg is different; it 
gives "Command contains unrecognized 
phrase/keyword." when trying to compile, rather 
than the "Syntax Error" you get when running the command through EXECSCRIPT().

Since the code is part of a large framework, I'll 
just keep the Macro expansion version in there 
instead, but it's good to know why there were differences in handling.

Thanks for the explanation.
-Steve


At 11:40 AM 01/14/2011, you wrote:
>VFP's ExecScript actually creates a prg file on 
>disk and compiles it on the fly, so I suspect 
>the text file created cannot handle the 
>characters. I would test this by creating a prg 
>that actually creates a file on disk , 
>containing the text you just posted, and see if 
>it gets created correctly (the characters are 
>identical). I expect it to not. If that's the 
>case and you really want to go with ExecScript, 
>the only way I see is to use StrConv() to 
>convert that value to hex and back from hex in 
>the SQL command. If it does save correctly, 
>though, it means it's something else and in that 
>case I would like to see the code that generates 
>that command. Maybe the value has an apostrophe 
>in it now and then? > -----Original 
>Message----- > From: 
>[email protected] 
>[mailto:profoxtech- > [email protected]] On 
>Behalf Of Steve Ellenoff > Sent: Friday, January 
>14, 2011 6:30 PM > To: [email protected] > 
>Subject: Re: Differences between EXECSRIPT and 
>Macro Expansion > > I forgot to mention that the 
>problem is related to the "funky" characters 
>of > the password field. > > The password field 
>is being encrypted, and that value is causing 
>the > EXECSCRIPT to fail. > > If you blank out 
>that value in the INSERT string, EXECSCRIPT 
>works fine.. I am > wondering why? > > TIA- > 
>-Steve > > At 11:26 AM 01/14/2011, you 
>wrote: > >Can someone explain why the following 
>code fails to work using > >EXECSCRIPT but works 
>in macro-expansion? > > > >tcSQL = [INSERT INTO 
>webaccess > >(AENABLED,FKID,LASTMOD,LASTUSER,LOGI 
>N,PASSWORD,PERSTYPE,UNIQU > EID) > >VALUES 
>(1,'_34I18SAUJ',{^2011-01-13 > >21:10:34},'_06L0T 
>TTG4','2011CN140-001','Š/bvmpsA˜œ†}:Âs','C','_34I18SAUQ  
> > >')] > > > >*Code below failss with a syntax 
>error > >EXECSCRIPT(tcSQL) > > > >*Code below 
>succeeds and correctly inserts the record with 
>all 
>fields > >&tcSQL > > > > > >TIA- > >Steve > > > > 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to