Er, I'm really sorry to post a stupid q to the list...it appears that I have to call reset before I bind new values...I stepped into the code and saw that the state machine's mode (running vs. inited) is checked as a flag..the sqlite code is quite accessible and I should have read the code first. Sorry!

cheres
ben

Ben Supnik wrote:
Hi Y'all,

I am using a loop to insert multiple values into a table...

INSERT INTO WED_selection(id,item) VALUES(@id,@item);

where id and item are my two parameters...WED_selection is a table whose primary key is PRIMARY KEY(id,item).

my code loop is:

// initialization once
sqlite3_prepare_v2
sqlite3_bind_parameter_index (to find my param indexes)

// for each bit of data I must write:

sqlite3_bind_XXX for each param
sqlite3_reset
do {
  sqlite3_step
} while result is SQLITE_ROW

BUT...on the second iteration through, I get a logic [EMAIL PROTECTED] is the same but @item has varied. If I break down and rebuild the sqlite statement each time, the inserts work normally.

It's as if the second binding doesn't "hold". What little bit of fine print am I missing? Do I need to reset first and then bind or something?

Thanks!
ben

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



--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
Scenery mailing list: [EMAIL PROTECTED]
Developer mailing list: [EMAIL PROTECTED]

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

Reply via email to