Hi Oleg,

Thanks that worked perfectly!

Cheers,
Matt

Oleg Broytmann wrote:
On Sat, Apr 15, 2006 at 01:53:28PM +1000, Matt Doran wrote:
  
connection_string = 'sqlite:/' + db_filename
connection = connectionForURI(connection_string)
connection.autoCommit = False
sqlhub.processConnection = connection

trans = connection.transaction()
    

   It is not enough to create a transaction. Either pass it as a connection
object to an every operation or make it the default global transaction.
   Either

1)
connection_string = 'sqlite:/' + db_filename
connection = connectionForURI(connection_string)
trans = connection.transaction()
MyTable.select(..., connection=trans)

   or

2)
connection_string = 'sqlite:/' + db_filename
connection = connectionForURI(connection_string)
trans = connection.transaction()
sqlhub.processConnection = trans

Oleg.
  

Reply via email to