As another further response and if you use automatic INTEGER PRIMARY KEY IDs, then the sqlite3_last_insert_rowid() call will tell you unambiguously, provided the call is made within an explicit transaction initiated before the insert.

As a further response, regarding that Martina said "insert ... new row and get back the id of this last inserted row", I believe that this likely reflects a poor design. Wherever possible, every field of a row to insert including its identifiers should be known BEFORE inserting the row, and that way, you don't need to ask afterwards what the id is, you already know because it is the value you told it to use when doing the insert. -- Darren Duncan

JcD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to