你知道Python如何与AS400交谈吗? [英] Would you know how Python can talk to AS400 ?

查看:1004
本文介绍了你知道Python如何与AS400交谈吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望通过Python与AS400对话。我正在努力使用import pyodbc库连接到AS400。任何人都可以与我共享剪切代码吗?



我试图使用

telnet连接到AS400系统通过telnetlib(Python)



我尝试了什么:



我试过上面的telnet库

I am looking to talk to AS400 via Python. I am struggling to connect to AS400 using the import pyodbc library. Can anyone share the snipped code with me?

I have tried to use
Telnet connection to an AS400 system via telnetlib (Python)

What I have tried:

I have tried the above telnet library

推荐答案

如果您要访问400上的数据,则需要数据提供者。 IBM的Client Access为.Net和ODBC提供了一个。由于您可能无法使用.Net,我建议您使用ODBC。



从您的角度来看,它就像连接到DB2。 />


确保数据库TCP服务器在400上运行。这是通过STRTCPSVR命令完成的。



从数据库的角度来看,AS400就像任何其他数据库一样。像对待SQL Server,Oracle等一样对待它。



Mike
If you're looking to access the data on the 400 you need a data provider. IBM's Client Access provides one for .Net and for ODBC. Since you're probably not able to use the .Net one I suggest you use the ODBC one.

From your point of view it's like connecting to DB2.

Make sure the Database TCP server is running on the 400. That is done via the STRTCPSVR command.

Just understand that the AS400, from a database point of view, is just like any other database. Treat it like you would SQL Server, Oracle, etc.

Mike


这篇关于你知道Python如何与AS400交谈吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆