as far as I know, pyodbc does not support OUT parameters. The info they have on stored procs is here:
http://code.google.com/p/pyodbc/wiki/StoredProcedures if you want to work with the Pyodbc cursor directly (or any other cursor, like that of pymssql perhaps): conn = my_session.connection() dbapi_conn = conn.connection cursor = dbapi_conn.cursor() the "isoutparam" flag is currently only understood by the cx_oracle dialect. On Apr 4, 2014, at 11:53 AM, anierud...@gmail.com wrote: > Hi, > > I am trying to execute stored procedure from python / pyramid code. I am > passing 3 input & 1 output parameter. But I am not able to receive output > parameter back. > Here is Stored Procedure > > CREATE PROCEDURE MY_PROC > @empID char(10), > @oldEmpList XML, > @newEmpList XML, > @Status INT OUTPUT > AS > -- sp body > SET @Status = 1 > RETURN > GO > > Here is Python code that calling stored procedure > > t = text('EXEC MY_PROC :empID, :oldEmpList, :newEmpList, :Status', > bindparams=[bindparam('empID', type_=String, value='1234'), > bindparam('oldEmpList', type_=TEXT, > value='<emp><id>1</id><id>2</id>'), > bindparam('newEmpList', type_=TEXT, > value='<emp><id>e01</id><id>e02</id>'), > bindparam('Status', type_=Integer, value=0, > isoutparam=True)]) > result = CMS_DBSession.execute(t) > print result.out_parameters > > Thanks > Aniruddha > > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.