报错:
(20010, b'DB-Lib error message 20010, severity 8:\nUnable to allocate sufficient memory (localhost)\nOperating System error during No error (12)\n')
代码:
import pymssql conn = pymssql.connect(host=ip,user=u,passwd=p,port=int(port),database='master', timeout=5,charset="gbk")
解决:去掉 charset="utf-8" 参数
pymssql.connect(host=ip,user=u,passwd=p,port=int(port),database='master', timeout=5)