Re: [sqlite] Simple string question

2013-11-15 Thread Igor Tandetnik
On 11/15/2013 8:33 AM, L. Wood wrote: But are there never quotes around the ?1, ?2, etc. even in SELECT statements? For example: SELECT * FROM table WHERE col1=?1 AND col2=?2; Is this correct or should there be '' around the ?1 or ?2 parameters? '?1' (with

Re: [sqlite] Simple string question

2013-11-15 Thread L. Wood
> D. Richard Hipp wrote: > It is safer and faster to use the sqlite3_bind_text() interface. > > First prepare your statement like this: > > INSERT INTO my_table(col1) VALUES(?1); > > Then run: > > sqlite3_bind_text(pStmt, 1, zYourString, -1, SQLITE_TRANSIENT); > > Then run your statement: > > sqlit

Re: [sqlite] Simple string question

2013-11-14 Thread RSmith
Suppose I have a table with one text column. I insert like this: INSERT INTO my_table (col1) VALUES ('arbitrary UTF-8 string'); * Isn't it true that the string must indeed be surrounded by single quotes as I do above? * Isn't it true that I have to replace all occurrences of ' in the original

Re: [sqlite] Simple string question

2013-11-14 Thread Simon Slavin
On 14 Nov 2013, at 12:58pm, L. Wood wrote: > Suppose I have a table with one text column. I insert like this: > > INSERT INTO my_table (col1) VALUES ('arbitrary UTF-8 string'); > > * Isn't it true that the string must indeed be surrounded by single quotes as > I do above? > * Isn't it true th

Re: [sqlite] Simple string question

2013-11-14 Thread Stephan Beal
On Thu, Nov 14, 2013 at 2:14 PM, Richard Hipp wrote: > On Thu, Nov 14, 2013 at 7:58 AM, L. Wood wrote: > > > Suppose I have a table with one text column. I insert like this: > > > > INSERT INTO my_table (col1) VALUES ('arbitrary UTF-8 string'); > > > > * Isn't it true that the string must indeed

Re: [sqlite] Simple string question

2013-11-14 Thread Richard Hipp
On Thu, Nov 14, 2013 at 7:58 AM, L. Wood wrote: > Suppose I have a table with one text column. I insert like this: > > INSERT INTO my_table (col1) VALUES ('arbitrary UTF-8 string'); > > * Isn't it true that the string must indeed be surrounded by single quotes > as I do above? > * Isn't it true t