> campos1='' > set textmerge to MEMVAR campos1 > set textmerge on noshow > FOR i=1 TO lnCampos > IF ASCAN(TblFields, UPPER(This.iadata[i,1]) )>0 > \\<<ALLTRIM(UPPER(This.iadata[i,1]))>> , > ENDIF > endfor > set textmerge off > set textmerge to >>and this does not work either, when the string reaches the dreaded limit . For a strange thing, if I replace the old code:
> FOR k=1 TO lnCampos > IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0 > zz=this.iaCampos[k]+"," > MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos ) > This.Campos=This.Campos+zz > END >>with this
> FOR k=1 TO lnCampos > IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0 > zz=this.iaCampos[k]+"," > MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos ) > This.Campos=This.Campos+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + zz > END >>the variable reaches 900 chars before it bombs, instead of 500.
FOR k=1 TO lnCampos * DEBUG * IF LEN( zz ) > 480 SET STEP ON ENDIF * END DEBUG * IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0 zz=this.iaCampos[k]+"," MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos ) This.Campos=This.Campos+zz ENDIf that doesn't show anything unusual I have only left-field ideas left: