On Apr 19, 2007, at 11:52 AM, Huy Do wrote:

>
> I have the following code
>
>         trans = db.engine.contextual_connect().begin
>         try:
>             for client_id in slist.keys():
>                 job_insert.execute( )
>                 job_id = engine.func.currval('job_id_seq').scalar()
>                 for r in rows:
>                     service_insert.execute( )
>             trans.commit()
>             self.error('Storage Period Charged Successfully. You  
> can now
> proceed with Invoicing')
>             return self.redirect('/invoice')
>         except:
>             self.error(sys.exc_info()[1])
>             trans.rollback()
>             return self.render('storage_charge.mak')

this code assumes the usage of the "threadlocal" engine strategy,  
since you are not explicitly using the connection from  
contextual_connect() along with your execute() statements.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to