Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why VFP Ole Db does not like ampersand sign.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01291957
Message ID:
01291960
Vues:
4
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform