在Windows中使用Python 3连接到Sql Server [英] Connecting to Sql Server with Python 3 in Windows
问题描述
有人可以指出我在如何使用Python连接到MS SQL Server的正确方向吗?我想要做的是读取一个文本文件,提取一些值,然后将文本文件中的值插入我的Sql Server数据库中的表。我使用Python 3.1.3,看起来在网上研究中发现的一些模块不包括在库中。我缺少什么?是否有一个很好的第三方模块我应该知道。任何帮助将非常感激。我使用Windows。感谢
Can someone please point me in the right direction of how I can connect to MS SQL Server with Python? What I want to do is read a text file, extract some values and then insert the values from the text file into a table in my Sql Server database. I am using Python 3.1.3, and it seems some of the modules I have come across in research online are not included in the library. Am I missing something? Is there a good 3rd party module I should know about. Any help would be greatly appreciated.I am using Windows. thanks
推荐答案
有一堆在Python wiki上列出的SQL Server库。至少 mxODBC 已完全准备好用于Python 3.1,但我还没有使用它,所以我不能评论其适当性...
There are a bunch more SQL Server libraries listed on the Python wiki. At least mxODBC is fully ready for Python 3.1, but I haven't used it so I can't comment on its appropriateness...
这篇关于在Windows中使用Python 3连接到Sql Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!