Using the following code with Pylons, SQLAlchemy and SQLSoup:
def add(self):
ians = text (""" SELECT * FROM insert_clinic(:name, :addr,
:city, :state, :zip, :taxid, :note, :website, :addedby) """)
conn = meta.soup.engine.connect()
ins = conn.execute(ians, name=request.params['name'],
addr=request.params['address'], city=request.params['city'],
state=request.params['state'], zip=request.params['zip'],
taxid=request.params['taxid'], note=request.params['note'],
website=request.params['website'], addedby=session['user_id'])
Session.commit()
Having set my PostgreSQL logs to debug and always show statements, I
can see that the statement produced by this code is hitting the
database and that it is a correct statement in and of itself, as it
works when applied in a standard query outside of my application;
however, when this code is executed by the application, the working
statement is passed but immediately followed by several ROLLBACK
commands which do not happen when the generated statement is copied
into pgadmin3's query designer verbatim. This prevents any rows from
being committed; when I experienced this problem earlier, ordering a
Session.commit() fixed it, but as seen here, that's not working right
now.
All help is deeply appreciated and needed. Thank you. : )
Signed
Jeff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---