Apostrophe and UPDATE
    Dr. Hawkins 
    dochawk at gmail.com
       
    Wed Oct  9 10:02:59 EDT 2013
    
    
  
On Tue, Oct 8, 2013 at 11:37 PM, Paul Foraker <paul at whitefeather.com> wrote:
> '(last_name,notes) VALUES ("O\'Byrne", "betting this won\'t work!") WHERE
> id=599' at line 1
>
You're using the wrong escape.
Inside a string, you need a double single quote, not a backslash.
It's worth keeping a preSql() function around, like:
function preSQL pSQL
    replace "'" with "''" in pSQL
   if pSQL is empty then
      return "NULL"
   else
      return "'" & pSQL & "'"
   end if
end preSQL
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
    
    
More information about the use-livecode
mailing list