Do not use SQLite for concurrent access over a network connection. Locking semantics are broken for most network filesystems, so you will have corruption issues that are no fault of SQLite. If your application requires concurrent network access, you should be using either a network client/server DBMS or programming your own Client/Server pair with the server process calling the SQLite API to modify the db file held on the servers' local filesystem.
SQLite uses file level locking as documented on the SQLite main page. A cursor (CURrent Set Of Records) is a concept designed for reading data, not writing. SQLite does not support navigation other than retrieving the result set in the order specified in the select statement. No "paging" backwards. It is possible to simulate a cursor, but the "simple" solutions may be imperformant for large result sets (e.g. producing half the result set to display a small number of records on a "middle page"). I assume you are looking for "transactions". SQLite supports both explicit transactions (BEGIN ... COMMIT/ROLLBACK) and "automatic" Transactions (each statement is ist own transaction). If you are just inserting/modfying a set of rows (this also includes a single row) within a single table, automatic transactions are sufficient. If you require multiple changes to multiple rows in one or more tables to complete together or not at all, then you need an explicit transaction. Gunter -----Ursprüngliche Nachricht----- Von: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Martina Pasini Gesendet: Montag, 27. Juni 2016 20:51 An: sqlite-users@mailinglists.sqlite.org Betreff: [sqlite] How to use "cursors" in c# Hello to Everyone! I am sorry to bother you, but I am new to DB and SQLite and I have a doubt. 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 have not studied yet how to manage locking etc (will I need it only when editing a row or also when adding a new one?) For this case, when I add a new row, could it be sufficient to use a cursor or something similar? Could you give me some advice/links I should read to understand how to manage this process? Thank you very much for you kind attention! Best Regards, Martina _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users