I am having problems getting my data to save when the changes are made
through stored procedures.
I created a sample block of code below to show exactly how I am
implementing this.

<code>
        conn = DBSession.connection()
        statement = sql.text("""CALL insert_test(321, 1);""")
        results = conn.execute(statement).fetchall()
        # The result set will have the new primary key value.
        if results == []:
          return None
    
          newID = results[0][0]
        transaction.commit()
        return newID
</code>

The return value indicates a nice integer.  And if I keep calling the
code over again, the return value increases by 1.  Further indicating
the INSERT statement contained within the stored procedure is working
correctly.

Maybe the transaction is not realizing there were any mods since I did
everything through the stored procedure?

Does anyone have an idea of how to get around this?

Thanks.
-Rodney


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to