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:
01291958
Views:
34
This message has been marked as the solution to the initial question of the thread.
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"
? "&"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform