I am programming in c# and I have to insert into a .sqlite file a new row
and get back the id of this last inserted row. This file "unfortunately"
might be located on an internal network and other users might try to add
other rows in the meantime.


I can't help with your locking issues, but if you are using the System.Data.SQLite ADO.NET provider in your C# program you can get the ID of the last row inserted with the LastInsertRowID property of your connection like this:


long rowID = connection.LastInsertRowId;

I use it after I commit the transaction.


Good luck,
-Bill
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to