Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on TEXT ENDTEXT use
Message
From
28/01/2012 18:11:06
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01533979
Message ID:
01533982
Views:
88
This message has been marked as the solution to the initial question of the thread.
Use pretext 15 instead of 7.

>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform