Hi All

I am using sqlsoup and pyodbc to update a couple of rows in the database. On
a number of tables in the database I have triggers that basically checks
keeps a log of changes on certain columns in the table (inserts changes into
another table). My problem is that I am unable to update values on tables
that has this trigger. No error/warning is thrown, it just fails silently.
When I disable the triggers the updates work fine. Also, if I run the update
statement directly on the database it works as expected, whether it's run
with or without the triggers.

Unfortunately disabling the trigger before the update (which makes the
update behave as expected) and re-enabling it afterwards is not an option as
this disables the trigger or ALL connections/sessions.

Attached is an example of what I am doing that is not working. I can't
figure out why this trigger would cause updates on these tables to fail.
What's even more confusing is that one of the tables has another trigger
(that also does inserts/updates on a different table) - when I run updates
on this table while this trigger is active, it behaves as expected.

The above problem also happens if I run the sql through pyodbc - leading me
to believe that the problem might be there. My questions are the following:
     1) Has anyone else encountered this behaviour? If so - have you any
advice for me?
     2) Is this a bug with pyodbc or sqlalchemy?
     3) Am I doing something wrong? (Is my use of sqlalchemy and sqlsoup
incorrect?)


-- 
Nicolaas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Attachment: triggersstoppingupdate.py
Description: Binary data

Reply via email to