Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
101 VFP7 Things, Part 19 - TextMerge()
Message
De
10/01/2001 10:38:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00460905
Message ID:
00461635
Vues:
14
I take it we are still talking VFP 7 here Mike


>TEXTMERGE and TEXT - ENDTEXT also allows output to a memvar.
>
>For example: You need to build a long sql statement into a string for remote database access. Instead of
>
>
>lFld1 = "SMITH"
>lFld2 = "JOHN"
>SqlStr = "SELECT *"
>SqlStr = SqlStr + " From YourTable"
>SqlStr = SqlStr + " Where LastName = '" + lFld1 + "'"
>SqlStr = SqlStr + " AND FirstName = '" + lFld2 + "'"
>SqlStr = SqlStr + " AND ActiveCustomer = 'Y'"
>
>
>You can
>
>lFld1 = "SMITH"
>lFld2 = "JOHN"
>TEXT to SqlStr TEXTMERGE NOSHOW
>SELECT *
> FROM YourTable
> WHERE LastName = '<<lFld1>>'
>   AND FirstName = '<<lFld2>>'
>   AND ActiveCustomer = 'Y'
>ENDTEXT
>SqlStr = STRTRAN(SqlStr,CHR(13)+chr(10),"")
>
>
>Wish there was a clean way to prevent the CRLF without using a STRTRAN or the // prefix with Textmerge.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform