Hello I'm currently facing a problem with the System.Data.SQLite ADO.NET Provider. I'm using stamps (simple integer column) on the rows in order to detect if another user has altered the same datarow during the time the first user started the edit and when he invoked the save. Every update increases this stamp and the update statement is constrained with the old stamp. If the update has no affected rows, there are different cases which are checked: - If the datarow has been deleted, the user is informed about this. - If the datarow still exists the current stamp in the database is retrieved. - If the db stamp is greater than the reference stamp, the user will be informed that another user changed the data in the meantime. - If the db stamp is smaller or equal to the reference stamp, an exception is thrown because the stamp can never get smaller.
I tried to simulate 3 users which are updating a datarow in the same table, every user changes it's own row. Basically I had 3 threads each of one first retrieving a row in one connection. Updating the data and storing it back into the table with another connection. Every thread made a loop with several edits and a sleep in between. Surprisingly I got exceptions for some edits, because the database stamp was smaller than the current reference stamp, which should never happen. So it seems like SQLite returned an old version of that row. Having the application stopped when the exception occured, I retrieved the same row in a management tool I saw the correct stamp and data for that particular row. I'm using the identical code for other database systems such as SQL Server and there it works fine, the database layer is completely abstracted. System.Data.SQLite version is 1.0.77.0 and the database is encryped with the included RC4 encryption. Has anybody encountered anything similar? Thanks for any help. Kind Regards Fabrizio _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users