gpt4 book ai didi

ubuntu - pymssql 无法在 ubuntu 12 上检索数据

转载 作者:行者123 更新时间:2023-12-04 19:21:41 25 4
gpt4 key购买 nike

pymssql 模块无法在 Ubuntu 12.04 上检索结果,我该怎么办?

Ubuntu 11.10(GNU/Linux 3.0.0-30-generic-pae i686):

tim@lbtim:~$ python
Python 2.7.2+ (default, Jul 20 2012, 22:12:53)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>> conn = pymssql.connect(host='10.156.70.7')
>>> curr = conn.cursor()
>>> curr.execute("select name from sysobjects where type='u'")
>>> for tbname, in curr:
... print tbname
...
spt_fallback_db
spt_fallback_dev
spt_fallback_usg
spt_monitor
spt_values
MSreplication_options
bo_aux_callmeet_registed
>>> curr.close()
>>> conn.close()
>>> exit()
tim@lbtim:~$

Ubuntu 12.04 LTS(GNU/Linux 3.2.0-23-generic-pae i686):
tim@lbtim:~$ python
Python 2.7.3+ (default, Apr 20 2012, 22:44:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>> conn = pymssql.connect(host='10.156.70.7')
>>> curr = conn.cursor()
>>> curr.execute("select name from sysobjects where type='u'")
>>> for tbname, in curr:
... print tbname
...
>>> curr.close()
>>> conn.close()
>>> exit()
tim@lbtim:~$

最佳答案

我也同意,但似乎是 ubuntu 12.04 中 FreeTDS 和 pymssql 的兼容性问题。

看这里。
https://bugs.launchpad.net/ubuntu/+source/pymssql/+bug/918896

关于ubuntu - pymssql 无法在 ubuntu 12 上检索数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16138455/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com