Re: [SQLObject] cannot insert with Sybase
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2009-03-03 18:18:24
|
On Tue, Mar 03, 2009 at 05:55:43PM +0000, wzi...@co... wrote: > class sqlmeta: > print 'class sqlmeta' > idName = 'title_id' > lazyUpdate = False > autoCommit = True sqlmeta doesn't have 'autoCommit' attribute. (It'd also be helpful to send python code properly formatted.) > book_a._connection.debug = True > book_a._connection.autoCommit = True It is too late to set this after creating a row. The settings should be set on the 'konnection' before inserting. > This code actually appears to work with no errors, but I can run it > many times with no duplicate rows because nothing gets inserted into > the database. No commit has been done. > I tried wrapping it all in a transaction and doing a > commit, but that didn't help. It'd be interesting to see the code. > It's not a permission problem Certainly not - with a permission problem you'd get an exception. > Note I instantiate two books. I don't want to, but I'm forced to > because if I try to give it a non-zero first key I get the error: > "sqlobject.main.SQLObjectNotFound: The object titles by the ID 0 > does not exist" ....even though I'm providing a non-zero key! Please show the debugging output and the entire traceback. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |