tags:

views:

346

answers:

1

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

+2  A: 

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

Robert Harvey