Jevgenijs Rogovs schrieb:
Hello everyone!
Could someone please assist me with the following: how do I insert a string
into an SQLite database that contains a CR or LF character? C-style escapes
(like \r and \n) are not working with SQLite, so how can I do this?
Depends on your sqlite interface.
With Tcl its straight forward:
package require sqlite3
sqlite3 db :memory:
db eval {create table test (a text)}
set text "A text\nwith linefeed and carriage return\r\n"
db eval {insert into test values ($text)}
db eval {select a from test} row {puts $row(a)}
This just works.
If you have a different binding it might be a little more complex.
Michael
--
Michael Schlenker
Software Engineer
CONTACT Software GmbH Tel.: +49 (421) 20153-80
Wiener Straße 1-3 Fax: +49 (421) 20153-41
28359 Bremen
http://www.contact.de/ E-Mail: [EMAIL PROTECTED]
Sitz der Gesellschaft: Bremen | Geschäftsführer: Karl Heinz Zachries
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------