python Lotus Notes:odbc连接错误:未找到源名称且未指定默认驱动程序

发布于 2024-08-08 11:26:30 字数 673 浏览 2 评论 0原文

我正在为跨数据库系统开发客户端-服务器应用程序。

我正在使用带有 Python 2.5 和 PyODBC2.5 的 Eclipse IDE;需要从 Lotus Notes 数据库读取内容,因此运行一些基本查询,例如 - SELECT personname FROM tablename。

'import pyodbc' 没问题 - Python 可以看到它!

但是当我尝试运行时:

conn = pyodbc.connect("DRIVER={Lotus NotesSQL Driver};SERVER=localhost;UID=John
Meyer;PWD=yellowbird;DATABASE=mydb.nsf")

它给出了错误:

pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified (0) (SQLDriverConnectW)')
[01S00] [Microsoft][ODBC Driver Manager] Invalid connection string attribute (0)

任何建议 - 这里应该缺少什么?高度赞赏所有意见和建议。

I am developing a client-server application for a cross-database system.

I am using Eclipse IDE with Python 2.5 and PyODBC2.5; need to read content from a Lotus Notes database, so run some basic query like - SELECT personname FROM tablename.

'import pyodbc' is ok - Python sees it!

But when I try to run:

conn = pyodbc.connect("DRIVER={Lotus NotesSQL Driver};SERVER=localhost;UID=John
Meyer;PWD=yellowbird;DATABASE=mydb.nsf")

it gives the error:

pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified (0) (SQLDriverConnectW)')
[01S00] [Microsoft][ODBC Driver Manager] Invalid connection string attribute (0)

Any suggestions - what should be missing here? All comments and suggestions are highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过度放纵 2024-08-15 11:26:30

我认为您想尝试通过 SQL 访问 Lotus Notes 数据很奇怪。当我过去连接 Notes 和 Python 时,我总是使用 Lotus Note COM 对象来访问数据。毕竟,Notes 是像 CouchDB 一样的文档数据库,而不是关系数据库。

I think it's odd that you want to try accessing Lotus Notes data vie SQL. When I have interfaced Notes and Python in the past, I always used the Lotus Note COM object to access data. After all, Notes is a document database like CouchDB, not a relational database.

雨的味道风的声音 2024-08-15 11:26:30

我差点忘了在这里发布解决方案...

我们已经设法让 NotesSQL 通过 ODBC 使用 python 来访问 Lotus Notes *.NSF 文件(数据库)中的数据。它用作查询,使用与在 MS-Access 上工作以获取 Lotus Notes *.nsf 文件内的信息时通常需要使用的相同类型的查询语法来获取数据。

因此,我们可以使用 ODBC 通过 SQL 访问数据。

I almost forgot to post the solution here...

We have managed to put NotesSQL to work through ODBC with python to access data from our Lotus Notes *.NSF files (database). It works as queries using the same type of queries syntax you would need normally use to get the data when working on MS-Access to grab the info inside the Lotus Notes *.nsf file.

So we got access to the data via SQL using ODBC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文