Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/333.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python sybpydb能否与Sybase ASE 15.0配合使用?_Python_Sybase_Sap Ase - Fatal编程技术网

Python sybpydb能否与Sybase ASE 15.0配合使用?

Python sybpydb能否与Sybase ASE 15.0配合使用?,python,sybase,sap-ase,Python,Sybase,Sap Ase,我从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.Datab

我从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.
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
sybpydb.DatabaseError:连接到服务器时出错。

我发现问题出在接口上。更新后,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',)]

我自己刚找到答案。但这里还有一个问题。如何将sybpydb从15.7服务器复制到其他位置(不使用root/sybase帐户)?我搜索了整个OCS文件夹,但没用。还有其他更好的方法吗?