1
從我的python代碼中,我試圖執行存儲過程。存儲過程返回整數值。MS SQL SERVER 2005 + SQLAlchemy +存儲過程+輸出參數
CREATE PROCEDURE MY_PROC
@empID char(10),
@oldEmpList XML,
@newEmpList XML,
@Status INT OUTPUT
AS
-- sp body
SET @Status = 1
RETURN
GO
蟒蛇
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
其打印毫無作爲輸出參數。
如何訪問輸出放慢參數