Commits

Vernon Cole  committed 5040cb9

make new cursors using the connection.cursor() method only

  • Participants
  • Parent commits 0a0db63

Comments (0)

Files changed (1)

File sqlserver_ado/base.py

 
     options = settings.OPTIONS
 
-    if not options.get('provider', None):
-        options['provider'] = 'sqlncli10'
+    provider = options.get('provider', 'sqlncli10')
 
-    sql_native = '=sqlncli' in options['provider'].lower()
+    sql_native = '=sqlncli' in provider.lower()
     # native client needs a compatibility mode that behaves like OLEDB
     conn_dict['cmpt'] = 'DataTypeCompatibility=80;' if sql_native else ''
     # default MARS to be present only if using SQL native provider
 
     # include any other keys from "other" -- which will replace those created above [especially "extra_params"]
     conn_dict.update(options)
-
+    conn_dict['provider'] = provider
     return conn_dict
 
 
     def _cursor(self):
         if self.connection is None:
             self.__connect()
-        return Database.Cursor(self.connection)
+        return self.connection.cursor()
 
     def disable_constraint_checking(self):
         """