UPDATE table and quote in a text

Horst baleareninsel at gmx.net
Sun Feb 17 11:09:14 EST 2008


Holá Mark,

The main question seems to be: How to "include" a textfile for example:
..
put "1234'5'6öä'ioup"#" into mytext ## I know, this text is senseless, but
never mind, it should be able to be saved
replace quote with "\" & quote in mytext ## and then, how to replave the '
??? 
put "UPDATE table set textfile = '" & mytext & "'... into sql_messqage
revexecutesql (my_ID), sql_message
put the result  ## shows an SQL-Error message and mytext will not be saved
..

best regards and, as usual, a big thank You for answering

Horst
 

Mark Schonewille-3 wrote:
> 
> Dear Horst,
> 
> Single quotes should be escaped the way you do and this should work  
> fine. I have seen reports of commands starting with revdb being  
> unable to escape single quotes, but this can be solved by using  
> revExecuteSQL -- I don't know whether there really is a bug with  
> escaping characters, I didn't encounter this problem myself. Make  
> sure that you only replace single quotes that are part of the data  
> and not the two single quotes that surround the string.
> 
> Best regards,
> 
> Mark Schonewille
> 
> --
> 
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
> 
> Convert colours between different colour spaces with Color Converter.  
> Download at http://economy-x-talk.com/cc.html
> 
> 
> 
> Op 17-feb-2008, om 13:24 heeft Horst het volgende geschreven:
> 
>>
>> Hi there,
>>
>> A  question to all SQL-Masters:
>> To update a record in a SQL-Table and to store text which includes  
>> the "
>> sign in an SQL-Syntax I learnd, that it is necessary to use
>>
>> replace quote with "\" & quote in zText
>> Well, that works fine, but what about The ' sign?
>>
>> replace "'" with "\'" in zText
>> seems NOT to work.
>>
>> Thanks a lot to all of you and best regards
>>
>> Horst
>> -- 
>> View this message in context: http://www.nabble.com/UPDATE-table- 
>> and-quote-in-a-text-tp15529083p15529083.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/UPDATE-table-and-quote-in-a-text-tp15529083p15530593.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list