Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apostrophe in email address
Message
 
 
To
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:
01658662
Views:
48
>>>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.

You are right. I just took the time (about 10 minutes) and made the change. You owe me 10 minutes :)
Thank you.
"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
Next
Reply
Map
View

Click here to load this message in the networking platform