On 16 Jan 2015, at 7:06pm, Andy (KU7T) <k...@ku7t.org> wrote:

> If I just build the sql string myself, how can I solve encoding
> issues as mentioned above?

There's only one character which should cause a problem with embedded strings: 
the apostrophe.  And you escape this by doubling it.  Illustration:

INSERT INTO myTable VALUES ('I can't stand this.')

will fail because the string ends at the 't' so the command can't be parsed.

INSERT INTO myTable VALUES ('I can''t stand this.')

will succeed, inserting a string containing, among other things, a single 
apostrophe.

So write yourself a little routine which doubles apostrophes and you should be 
fine.

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

Reply via email to