On Wed, 24 Apr 2013 16:35:21 +0200 "J Trahair" <j.trah...@foreversoftware.co.uk> wrote:
> I've found that either one of these will lock the database: > > mstrSQL = "PRAGMA locking_mode = EXCLUSIVE;BEGIN EXCLUSIVE;" > mstrSQL = "PRAGMA locking_mode = EXCLUSIVE;BEGIN > EXCLUSIVE;COMMIT;" > > and that closing the connection a little while later (eg. 0.25sec) > > mcmd.Connection.Close() > > releases it. I read in one place that you need a transaction eg. SELECT * > FROM Utilities WHERE RecNo = 1 for locking to occur, but this database > locks without one. You are getting the lock twice, one with the pragma, that lock whole db, second wih the begin exclusive. If the database is in wal mode, it needs a read or a write access to get lock. Surely your db isn't in wal mode. You can check it calling the correct pragma. > > Jonathan > --- --- Eduardo Morras <emorr...@yahoo.es> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users