Try:
 
 
 // initialization once
 sqlite3_prepare_v2
 
 // for each bit of data I must write:
 do {
   sqlite3_bind_XXX for each param
   result = sqlite3_step
   sqlite3_reset
 } while result is SQLITE_ROW

Ben Supnik <[EMAIL PROTECTED]> 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]
-----------------------------------------------------------------------------


Reply via email to