I wrote my own custom update statement.  It's a simple update
statement, When I run the update on mysql, I get the result as
expected, i.e., the table is emtpy, so no rows affected, nothing
done.  When I run it in my Tg script, it runs once, and boom, it
stalls on this:

result = turbogears.database.get_engine().execute(dml)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line
776, in execute
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line
520, in execute
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line
535, in execute_text
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line
584, in _execute_raw
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line
602, in _execute

And spits out:

sqlalchemy.exceptions.SQLError: (KeyboardInterrupt)  'UPDATE fr_blah
SET blah1=3, blah2=1 WHERE blah3=1 AND blah4=1 AND blah5=3 AND
blah6=1' ()

Of course, the Keyboard interrupt comes from me when the statement
just hangs.  Ok, so what's going on now?  I'm almost fed up of
sqlalchemy and definitely thinking of moving to Pylons, but I'm giving
it my last few shots.  Am I running out of connections?  Am I not
using session.flush() here?  This update runs in a loop in one of my
batch jobs in TG.

Note that I wrote my custom UPDATE and running it through the result
= .... line above.  One more thing to add, I added a session.clear()
the first time and it worked the first time but then again, I see the
same problem after running the script again.

thanks, and any help would be appreciated,

Sam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to