Let me preface this by saying I may still not having a sufficient
grasp of SQL Alchemy.
I am adding a set of entries to the database, one at a time. Before
adding each entry I check to ensure a similar entry is not in the
database. If there is, I consider the entire set invalid and attempt
to do a rollback. So, in pseudocode:
Loop through my input data:
Query DB to check for duplicate
if not duplicate:
DBSession.add(entry)
if duplicate:
DBSession.rollback()
return #Returns to the controller method, which then returns
result
data for rendering.
I keep getting the following error:
InvalidRequestError: The transaction is closed
Can anyone give me some guidance on this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---