Python 3和Sybase等数据库(Python 3 and Sybase and other databases)

编程入门 行业动态 更新时间:2024-10-22 10:45:16
Python 3和Sybase等数据库(Python 3 and Sybase and other databases)

我是python的新手。 对不起,如果这是一个菜鸟问题。 但我仍在搜索如何使用python 3连接到数据库。我在一些网站,论坛上看到的大部分内容都是关于python 2.是否有任何用于python 3的DBAPI或数据库驱动程序(特别是sybase,oracle和SQLSERVER)?

或者有没有人成功使用2to3移植sybase库? 我没有运气。 :(

I am new to python. Sorry if this is a noob question. But I am still searching on how can I connect to databases using python 3. Most of what I can see on some sites, forums, are about python 2. Is there any good DBAPI or database driver for python 3 (especially sybase, oracle and sqlserver)?

Or did anyone succeed on porting sybase library using 2to3? I have no luck. :(

最满意答案

要在Sybase ASE中使用Python(支持2.6,2.7和3.1),您需要做两件事:

用于Python的sybpydb扩展模块 Sybase Open Client SDK

Sybase 为希望使用Python连接到Sybase ASE的程序员提供了文档 。

如果您在Sybase SQLAnywhere中使用Python,则需要sqlanydb模块。

以下是使用Sybase SQLAnywhere和Python的文档 。

To use Python (2.6,2.7 and 3.1 are supported) with Sybase ASE you need two things:

sybpydb extension module for Python Sybase Open Client SDK

Sybase has documentation for programmers wishing to connect to Sybase ASE with Python.

If you are using Python with Sybase SQLAnywhere you need the sqlanydb module.

Here is the documentation for using Sybase SQLAnywhere with Python.

更多推荐

本文发布于:2023-08-04 12:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1415965.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   Python   Sybase   databases

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!