Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
&name in URL
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00807280
Message ID:
00807286
Views:
18
Hi Brenda,

FoxPro performs macro substitution in the string literals. For example,
name = "SomeThing"
lcStr = "Name=&name, "
? lcStr   && Dispalys 'Name=SomeThing, '
To avoid macro substitution you can separate '&' from the variable name as follows
lcStr = "Name=&" + "name, "
* Or in case of URL, you can use encoded character
lcStr = "Name=%26name, "
>I am using the following code to build a URL. NAME is a column name in my table. Even though &name is within quotes, it is picking up the value of the column NAME and inserting the value in the URL. I can not replicate this in the developer, only during execution. Any ideas how I can keep '&name' as a literal?
>
>URL = 'http://www.whitepages.com/search/Find_Person?firstname_begins_with=1&name_begins_with=0&firstname=&name=' + ;
> save_lname + '&city_zip=' + save_zip + '&state_id='
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform