@Marcelo:

Going back to your original question: do you really only want to
insert one item at a time?  If so, I think your question has been
answered reasonably well.

BUT: if you have a large number of items, and you want to insert items
that aren't yet in the table, then you can do it efficiently in a
single query.  Check the documentation for "INSERT OR IGNORE", i.e.

   http://sqlite.org/lang_insert.html

Also, you say a new item is to be "inserted only if this item is not
yet in that table", but you haven't described how you discriminate a
new item from an existing item.  Obviously you are not comparing
primary keys (since the new item won't have a primary key) -- do you
mean to compare all of the other fields?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to