On 5/24/2012 10:17 PM, Andrew Cherednik wrote:
Thanks guys. You really helped me. I think I know what I am going to do. You 
see, as I am using a single connection object there is at least one selection 
statement executed at the beginning of each process. Then, during the program 
lifecycle there could be a few updates executed, that use the same connection 
object. So, the transaction that was opened with a SHARED lock would be 
converted to a RESERVED lock until committed.

Therefore, I am thinking of using separate (local) connections for the routines 
that do the updates, and leaving the global connection object for the selects 
only.

If you are willing to do that, then you can simply perform select and updates on the same connection but in separate transactions. Be aware that, in this scenario, the data you've obtained with SELECT might already be out of date by the time you get to inserts and updates. This is true whether you are doing updates on a separate connection, or in a separate transaction on the same connection.
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to