我正在尝试使用 Python 的 Sybase 模块调用数据库中的存储过程,并且我正在返回这个 proc_status。我不知道这个 proc_status 是什么意思。谁能告诉我?下面附上代码
#!/usr/bin/python_64
#coding=utf-8
import sybpydb
#Create a connection object
con = sybpydb.connect(
servername="********",
user="*******",
password="********" )
#Create a cursor object
cur = con.cursor()
#start_date = '20170505'
#end_date = '20180505'
#dealer_code = '7802'
#dealer_rep_code = 'ZWF1'
try:
cur.callproc('trans_history.sp', ['20170505','20180505','7802','ZWF1'])
continues = True
while(continues == True):
row = cur.fetchall()
continues = cur.nextset()
except sybpydb.Error:
print("Status=%d" % cur.proc_status)
#Close the connection
cur.close()
con.close()
这是输出:状态= -6