*-- Cf UT 25/12/2009 SET SAFETY OFF *!* lcSql = CHRTRAN( This.csql, 0h0d0a, SPACE(2) ) m.lcSql = THIS.csql *-- Pour garder le requête Sql sur disque et pouvoir la dégoguer. STRTOFILE( m.lcSql , 'Temp.txt' ) SET SAFETY ON *-- Bug &m.lcSql NE FOCNTIONNE PAS et donne une erreur 16 ! &lcSql>>OK naomi !
>>TEXT To oSql.cSql NOSHOW TEXTMERGE PRETEXT 15 >> << m.cSql1 >> >> << m.cInner1 >> >> << oSql.ccondit1 >> >> << m.cSql2 >> >> << m.cInner2 >> >> << oSql.ccondit2 >> >> ORDER BY 3 , 1, 4 , 2 INTO CURSOR CrystalNew READWRITE >> ENDTEXT >>>>
&oSql.cSql>will probably never work, because you forgot that while the ampersnad starts the macro expansion, dot terminates it. So your macro tried to expand oSql (the part of the command which was between & and .) as a string, then append "cSql" to that string, then evaluate it as a command. Which won't work, because oSql is an object, not a string.
var1="something" >x="var" >? &x.1>
lcSql=chrtran(oSql.csql, 0h0d0a, space(2)) >&lcSQL