RE: [sqlite] a c++ newbie question - prepared statements.

2007-08-07 Thread James Dennett
Stephen Sutherland [mailto:[EMAIL PROTECTED] wrote: > > Thanks this is great information on sqlite's prepared statements. > > I think I have just one more question on this subject. > > I need to execute a SQL statement like this: > "SELECT * FROM tbl WHERE BookID IN ( :arrayNumbers) ;" If

Re: [sqlite] a c++ newbie question - prepared statements.

2007-08-06 Thread Stephen Sutherland
Thanks this is great information on sqlite's prepared statements. I think I have just one more question on this subject. I need to execute a SQL statement like this: "SELECT * FROM tbl WHERE BookID IN ( :arrayNumbers) ;" My function will be receiving an array like this

RE: [sqlite] a c++ newbie question

2007-08-06 Thread Downey, Shawn
Does anyone have any experience compiling SQLite to run in the Micrium operating system on an ARM9 platform? http://www.micrium.com/ Thank you. Shawn M. Downey MPR Associates 10 Maxwell Drive, Suite 204 Clifton Park, New York 12065 518-831-7544 (work) 860-508-5015 (cell) --

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Eugene Wee
How can I do the same with prepare statements ? Is it possible for me to prepare 10,000 in a loop and then surround them with BEGIN TRANSACTCION AND END TRANSACTION ? Yes. As an added benefit the preparation would mean that the SQL statement does not have to be parsed on each iteration of

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Stephen Sutherland
Everyone has suggested the use of prepared statements. I was actually inserting ~10,000 records with great results using BEGIN TRANSACTION; and END TRANSACTION; I was making 1 big string of insert statements and executing them all at once. It was extremely fast. How can I do th

Re: [sqlite] a c++ newbie question

2007-08-05 Thread Bharath Booshan L
Hi Stev, Prepared statements are best option, however try sqlite3_mprintf() with '%q' as format specifier which escapes every '\' character. Find more info in http://sqlite.org/capi3ref.html. Bharath Booshan L. On 8/6/07 11:50 AM, "Stephen Sutherland" <[EMAIL PROTECTED]> wrote: > Hi ; >

Re: [sqlite] a c++ newbie question

2007-08-05 Thread Eugene Wee
Hi Stev, Why not just use prepared statements? Regards, Eugene Wee Stephen Sutherland wrote: Hi ; I am trying to treat a string before passing it through my SQL statement into the database. I know that a single apostrophe will break the SQL statement. So I have to replace them a

Re: [sqlite] a c++ newbie question

2007-08-05 Thread Trevor Talbot
On 8/5/07, Stephen Sutherland <[EMAIL PROTECTED]> wrote: > I am trying to treat a string before passing it through my SQL statement > into the database. > > I know that a single apostrophe will break the SQL statement. > So I have to replace them all to double apostrophes. > But are the

[sqlite] a c++ newbie question

2007-08-05 Thread Stephen Sutherland
Hi ; I am trying to treat a string before passing it through my SQL statement into the database. I know that a single apostrophe will break the SQL statement. So I have to replace them all to double apostrophes. Question #1: What may I ask is the c or C++ code to accomplish th