【问题标题】:Will sybpydb work with Sybase ASE 15.0?sybpydb 能否与 Sybase ASE 15.0 一起使用?
【发布时间】:2014-03-31 21:13:22
【问题描述】:

我从 Sybase ASE 15.7 安装中获得了 sybpydb(Sybase Python 扩展模块)。 但我们团队中的大多数其他服务器仍处于 15.0。 我可以使用 sybpydb 开发 Python 脚本来访问那些 15.0 的服务器吗?

我收到此错误,但不确定这是否仅仅是因为 sybpydb 无法与旧 ASE 一起使用:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sybpydb.DatabaseError: Error in connecting to the server.

【问题讨论】:

  • 我自己找到了答案。但这是另一个问题。如何将 sybpydb 从 15.7 服务器复制到其他地方(不使用 root/sybase 帐户)?我对整个 OCS 文件夹进行了 tar 处理,但它没有用。还有其他更好的方法吗?

标签: python sybase sap-ase


【解决方案1】:

我发现问题出在接口上。更新后,15.0.3 ASE 服务器一切正常。

所以答案是肯定的,来自 Sybase ASE 15.7 的 sybpydb 可与 15.0 服务器一起使用。

ops@:~$ python
Python 2.7.2 (default, Jun 22 2011, 10:50:25) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import sybpydb
>>> conn = sybpydb.connect(user='xxx', password='xxx', servername='xxx')
>>> cur = conn.cursor()
>>> cur.execute("select top 1 * from ant_absence")
>>> rows = cur.fetchall()
>>> print rows
[(10000890, '0129119', 'E', 'PM', 1388480143)]
>>> cur.execute("select @@version")
>>> rows = cur.fetchall()
>>> print rows
[('Adaptive Server Enterprise/15.0.3/EBF 17779 ESD#4/P/Solaris AMD64/OS 5.10/ase1503/2768/64-bit/FBO/Thu Aug 26 11:42:38 2010',)]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多