我试图使用
Python 2.7(32位)在Windows 7上使用pyodbc 3.0.6.,SQLAlchemy 1.0.4连接到sql server实例.我正在使用如下连接字符串
DRIVER={SQL Server};SERVER=mymachinename;DATABASE=mydb;UID=sa;PWD=admin1;
但我一直收到这个错误
Could not parse rfc1738 URL from string ‘DRIVER={SQL Server};SERVER=mymachinename;DATABASE=mydb;UID=sa;PWD=admin1’
我正在使用与sqlSoup.Something这样的连接字符串
db = sqlsoup.SQLSoup(connectionstring)
编辑
我尝试使用SqlAlchemy中的Automap,它也失败并显示相同的消息
Traceback (most recent call last):
File “C:\Sandbox\Python scripts\BumpValues\newConnectivityTest.py”, line 7, in
engine = create_engine(“DRIVER={SQL Server};SERVER=gagan;DATABASE=persons;UID=sa;PWD=admin1;”)
File “C:\Python27\lib\site-packages\sqlalchemy\engine__init__.py”, line 386, in create_engine
return strategy.create(*args, **kwargs)
File “C:\Python27\lib\s