Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on TEXT ENDTEXT use
Message
De
28/01/2012 20:15:32
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01533979
Message ID:
01533987
Vues:
70
>>>
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform