Using sqlite3, I inserted a new row into table Foo.
INSERT INTO Foo VALUES (colX=?, colY=? colZ=?)
Then I bind and execute the query. This table contains an auto-incrementing column as the primary key. How do I get at this ID after a new row was added without doing a query?
Use sqlite3_last_insert_rowid:
This gets the last inserted id, just like you asked.
http://www.sqlite.org/c3ref/last_insert_rowid.html