Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apostrophe in email address
Message
De
10/03/2018 03:31:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01658635
Message ID:
01658658
Vues:
59
>>Yes, but think of how many places it takes to apply this - literally every field out there which may contain an apostrophe. Do this
>>
cSqlInsert = "INSERT INTO EMAILSEND (FROM_NAME, FROM_EMAIL, TO_EMAIL) values " + ;
>>   "(?lcSendName, ?lcSenderEmail, ?lcRecipientEmail)"
>>and Fox will handle the escaping, putting dates/datetimes, logicals and everything else into proper format. Just make sure the variables are in scope when the actual sqlexecute() happens.
>
>This is a good approach. But it would require quite a few/many changes in my code. Because, as you correctly said, the variable should be in scope.
>Thank you.

Changes are inevitable, as you find more and more places where a string value may contain an apostrophe... Once you start looking, you'll be amazed how many you'll find. So do this in the places you find - if you have to change, change to simpler. Makes life easier.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform