Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
101 VFP7 Things, Part 19 - TextMerge()
Message
From
10/01/2001 10:38:34
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00460905
Message ID:
00461635
Views:
12
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform