Re: [sqlite] stmt question

2007-05-02 Thread John Stanton

Variables are bound until you issue a reset or finalize.

Jonathan Kahn wrote:

Hi,

  I have a couple questions about using prepared statements with sqlite.

 


  If I prepare a statement can I bind variables as my value and then set the
variables in a loop and execute?  Or in my loop would I bind my values and
step so each bind gets executed until it equals SQLITE_DONE then reset?  I
guess I am just unclear on how to execute my prepared statement and set my
values in a loop.

 


Is there a better way to do what I want?  Am I completely off base?

 


Any info is much appreciated.  This is my first time working with the
sqlite3 api and sqlite so please forgive any ignorance.

 


Thanks a lot,

- Jon





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] stmt question

2007-05-02 Thread Jonathan Kahn
Hi,

  I have a couple questions about using prepared statements with sqlite.

 

  If I prepare a statement can I bind variables as my value and then set the
variables in a loop and execute?  Or in my loop would I bind my values and
step so each bind gets executed until it equals SQLITE_DONE then reset?  I
guess I am just unclear on how to execute my prepared statement and set my
values in a loop.

 

Is there a better way to do what I want?  Am I completely off base?

 

Any info is much appreciated.  This is my first time working with the
sqlite3 api and sqlite so please forgive any ignorance.

 

Thanks a lot,

- Jon