Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on TEXT ENDTEXT use
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Question on TEXT ENDTEXT use
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01533979
Message ID:
01533979
Vues:
98
Hi,

I am trying to change assigning a literal string to a variable to using TEXT ENDTEXT (literal can sometime exceed the allowed length). But I don't know how to use the TEXT ENDTEXT so that the resulting variable is one string without spaces. Here is an example:

Literal (exactly how it is in my code with all the semicolons):
cSqlCommand = "select mytable.field1, mytable.field2 from mytable " + ;
" left join mytable2 on mytable.pk = mytable2.pk " + ;
" where " + cSomeFilterExpr + " order by field1, field2 "
My attempt at TEXT ENDTEXT:
TEXT TO cSqlCommand TEXTMERGE NOSHOW PRETEXT 7
       select mytable.field1, mytable.field2 from mytable
       left join mytable2 on mytable.pk = mytable2.pk 
       where  <<cSomeFilterExpr>> order by field1, field2
ENDTEXT
The problem (as I see it) is that in the bottom case (TEXT TO ENDTEXT) the variable cSqlCommand (in Messagebox()) looks just like it is on the screen. And it should be all in one string. What am I missing? TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform