Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apostrophe in email address
Message
From
10/03/2018 03:31:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01658635
Message ID:
01658658
Views:
62
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform