I'm using c++ and generate the whole insert string via sqlite3_vmprintf with quoted text. So the '\r' and '\n' are single characters - this will result in the error. @J.King: I followed your hint to bind the values. Works now as expected. The c strings are now correctly inserted.

Am 21.09.2017 um 16:20 schrieb J. King:
More details would help. How are you inserting the data? Are you using a bound 
parameter (you should be), or quoted text? Are you using something other than 
the C interface to interact with the database? Which error did you receive? Can 
you provide a minimal example of the code you used?

On September 21, 2017 9:56:29 AM EDT, heribert <herib...@scharnagl.com> wrote:
Hello,

i attempt to make a INSERT with a TEXT field containing a string with
\r
and \n characters, but it fails (Strings without \r and \n characters
are inserted correct).
The sqlite3_exec results with error... i think the reason are the
special characters.
What is the correct way to store strings containing \r and \n in a TEXT

field?

Thx for any hint
heribert
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to