Hi Ulrik,

Now, that's all fine and everything for interactive SQL, but when I'm
using this in a program (written in Delphi), the comma messes up the
returned values (since they are comma seperated)



You can do escaping that replaces the comma with something else when writing to the table, then converts it back after you have gotten the info from the comma-separated format.

For example, URLs regularly use %XX to escape characters such as space,
where XX is the hexadecimal ASCII value. So "space" (ASCII 32) will be
"%20". Just remember to escape not only the comma, but also the
percentage sign or whatever signals your escape sequences.


Ahh! That's a good idea! What characters would I need to escape? Comma, obviously, percentage, what else would freak SQLite out? I guess that when stuff is returned from the database or inserted into it, I should escape it or unescape the text?

Thanks for the tip!
--
Taj

Reply via email to