RE: [sqlite] How to insert a string using C interface that contains both single and double quotes

2005-05-25 Thread John Buck
Try this char * EscapedQuery = sqlite3_mprintf("%q",MyQuery); ///.. Do some Stuff .. execute query..etc.. sqlite3_free(EscapedQuery); -- JB -Original Message- From: Sergey Startsev [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 11:45 AM To: Sankara Narayanan Subject: Re:

[sqlite] How to insert a string using C interface that contains both single and double quotes

2005-05-25 Thread Sankara Narayanan
Hi, I have a tricky situation where I have strings in my data that have both single and double quotes. I am using the C APIs of sqlite3_prepare and sqlite3_exec to insert data into the database. How do I prepare the query string in such case where the string data have both single and double