Re: [sqlite] duplicate a prepared statement?

2011-03-10 Thread Jay A. Kreibich
On Thu, Mar 10, 2011 at 11:33:28AM +, Philip Graham Willoughby scratched on the wall: > On 9 Mar 2011, at 21:29, Nick Hodapp wrote: > > Is it possible to duplicate a prepared statement? > > Yes, if the original statement used sqlite3_prepare_v2: > DBrc = sqlite3_prepare_v2(db,sqlite3_s

Re: [sqlite] duplicate a prepared statement?

2011-03-10 Thread Philip Graham Willoughby
On 9 Mar 2011, at 21:29, Nick Hodapp wrote: > Is it possible to duplicate a prepared statement? Yes, if the original statement used sqlite3_prepare_v2: DBrc = sqlite3_prepare_v2(db,sqlite3_sql(original),-1,&duplicate,NULL); > I have a need to run the same query multiple times with differ

[sqlite] duplicate a prepared statement?

2011-03-09 Thread Nick Hodapp
Is it possible to duplicate a prepared statement? I have a need to run the same query multiple times with different parameters. I can't re-use the prepared statement because multiple copies of the same query, but with different parameters, are active at the same time. That is, I need to step thr