I have tested your code and the first error is on the assignment line: tcSQL = ...
and the origin lies exactly in the password portion, where are used very low ascii values chars. Put the password string in a memory variable having care to build it with chr() functions for the problematic chars. Gianni On Fri, 14 Jan 2011 18:40:39 +0200, "Grigore Dolghin" <gdolg...@gmail.com> 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: profoxtech-boun...@leafe.com [mailto:profoxtech- > boun...@leafe.com] On Behalf Of Steve Ellenoff > Sent: Friday, January 14, 2011 6:30 PM > To: profoxt...@leafe.com > 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,LOGIN,PASSWORD,PERSTYPE,UNIQU > EID) > >VALUES (1,'_34I18SAUJ',{^2011-01-13 > >21:10:34},'_06L0TTTG4','2011CN140-001','/bvmpsA}:Âs','C','_34I18SAUQ > >')] > > > >*Code below fails 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: ProFox@leafe.com 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/vtv0j6pu0v58rrdsk5su8iliirdts79...@4ax.com ** 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.