Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why VFP Ole Db does not like ampersand sign.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01291957
Message ID:
01291960
Views:
5
Jim,

Your suggestion works! Thanks a million.

>Dmitry,
>
>No this is probably not something weird, it is probably that the & is a reserved character in VFP that does macro expansion even whne it is inside of quotes. So how do you deal with it? You break up your strings into pieces a=that keep the & from ever being next to another character as in;
>
>
>lcVar = STRTRAN(lcMyOtherVar, "&" + "amp;", "&" + "new;")
>
>
>This way you never run into a problem becasue there is variable named amp somewhere and VFP tries to macro the varaiable when it sees "&".
>
>As an example try running this code;
>
>
>amp = "My best work"
>? "&"
>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform