File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -196,11 +196,12 @@ def __buildConnectionString(self, conn_dict):
196196 else :
197197 if conn_dict ['engine' ] == 'mssql' :
198198 driver = "pyodbc"
199- sources = pyodbc .dataSources ()
200- driverName = sources ['SQL Server' ]
201- driverName = driverName .strip ().replace (' ' , '+' )
202199 #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
200+ conn = "%s+%s://%s:%s@%s/%s?driver=SQL+Server"
201+ if "sqlncli11.dll" in os .listdir ("C:\\ Windows\\ System32" ):
202+ conn = "%s+%s://%s:%s@%s/%s?driver=SQL+Server+Native+Client+11.0"
203+ self ._connection_format = conn
204+
204205
205206 elif conn_dict ['engine' ] == 'mysql' :
206207 driver = "pymysql"
You can’t perform that action at this time.
0 commit comments