我在SQLAlchemy + MSSQL中调用存储过程时遇到输出参数问题
这是我的代码:
engine = create_engine(app.conf['EPHYRE_CIS_URI'])
connection = engine.raw_connection()
payment_type_id = app.conf['CIS_FROM_WEB_PAYMENT_TYPE_ID']
cafe_id = app.conf['CIS_CAFE_FRANCH_ID']
account_id = app.conf['CIS_INTERNET_ACC_ID']
time_amount = 0
comment = u'Оплата на сайте'
payment_id = None #output
try:
cursor = connection.cursor()
result = cursor.callproc('Bas_CR_spPayment_Create', [client_id, payment_type_id, cafe_id,
account_id, payment_amount, time_amount,
comment, payment_id])
print result
cursor.close()
connection.commit()
print 'nice One! commited'
finally:
connection.close()
所以,我得到这样的话:
[u'1275', u'135', u'7', u'1567', u'13.00', u'0', u'Оплата на сайте', none]
虽然sqlalchemy开发人员说,结果必须是改变数据的真实结果。
我做错了什么? :d