I’m used to using the command “mysql_insert_id()” in PHP to return the id of the last line inserted into my database.
Is there an equivalent command in SQLite in C#?
Thanks!
-Adeena
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SELECT last_insert_rowid()
Also check out this post. It explains in detail how to adjust a DataAdapter to retrieve the last insert row ID.
http://sqlite.phxsoftware.com/forums/p/134/465.aspx#465