We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3bd605d + f798e13 commit a346e8fCopy full SHA for a346e8f
1 file changed
odm2api/ODMconnection.py
@@ -196,11 +196,12 @@ def __buildConnectionString(self, conn_dict):
196
else:
197
if conn_dict['engine'] == 'mssql':
198
driver = "pyodbc"
199
- sources = pyodbc.dataSources()
200
- driverName = sources['SQL Server']
201
- driverName = driverName.strip().replace(' ', '+')
202
#self._connection_format = "%s+%s://%s:%s@%s/%s?driver=SQL+Server+Native+Client+10.0"
203
- self._connection_format = "%s+%s://%s:%s@%s/%s?driver=" + driverName
+ conn = "%s+%s://%s:%s@%s/%s?driver=SQL+Server"
+ if "sqlncli11.dll" in os.listdir("C:\\Windows\\System32"):
+ conn = "%s+%s://%s:%s@%s/%s?driver=SQL+Server+Native+Client+11.0"
+ self._connection_format = conn
204
+
205
206
elif conn_dict['engine'] == 'mysql':
207
driver = "pymysql"
0 commit comments