I the solution you propose (more specifically the second one), where do I call commit() ata the end of the insertion process? can I call it On the class._connection, like below?
Test._connection.commit()
thanks,
Flávio
2006/4/15, Oleg Broytmann <[EMAIL PROTECTED]>:
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.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
--
Flávio Codeço Coelho
registered Linux user # 386432
---------------------------
"Laws are like sausages. It's better not to see them being made."
Otto von Bismark
