Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on TEXT ENDTEXT use
Message
From
28/01/2012 20:15:32
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01533979
Message ID:
01533987
Views:
71
>>>
>>>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
>>>
>>
>>TEXT/ENDTEXT stores the literal text contained into the variable, try changing your code to ...
>>
>>
>>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
>>
>
>So I suppose if my string is very long it has to be all in one line. I was hoping that for ease of reading I could make it
>into multiple lines. Thank you.
Dmitry,

for the ease pf reading you may write the text you whish in the variable, in your case cSQLCommand, write in easy reading lines like e.g.
select myTable.field1,
myTable,field2,
from myTable
left join myTable2 on myTable.PK = myTable2.pk
where  < < cSomeFilterExp r> > 
order by Field1, Field2
into cursor myCursor
notice that in case you are using Text...EndText the continuation mark ; and + are missing, since text...endtext is making indeed one big line, but that line you will never ever (I hope) have to read. Just read your code.

Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform