That's weird. It seems looking at the adapter in pydal, sqlite does not 
start a transaction after connection like most adapters. Reading the sqlite 
documentation, that's probably because sqlite starts a transaction 
automatically as soon as anything writes to the database.  
  
So, basically, you can use for_update in a select to start a transaction 
but only if sqlite didn't have any reason to start one before you did, 
which you want to do because by default sqlite starts transactions in *deferred 
*mode which means it only locks when it thinks it needs to. So what you 
want to do is to have a for_update select as the very first line in your 
controller and then use no other for_update=True as that will try to start 
a transaction in *immediate* mode again.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to