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 Hello, Wednesday, May 25, 2005, 11:30:00 PM, you wrote: SN> single and double quotes. I am using the C APIs of sqlite3_prepare and SN> sqlite3_exec to insert data into the database. How do I prepare the query SN> string in such case where the string data have both single and double SN> quotes. This insert works currently: INSERT INTO test (str) VALUES ('single ''quotes'' and double "quotes"') -- Best regards Sergey Startsev SQLite Analyzer - GUI tool to manage SQLite databases. http://www.kraslabs.com/sqlite_analyzer.html