Commits

Michael Manfre  committed 5b358e6

Fix SQL version detection. A no-op cursor is opened when DatabaseWrapper is initialized to ensure the connection has been interogated.

  • Participants
  • Parent commits b4e762c

Comments (0)

Files changed (2)

File sqlserver_ado/base.py

         except ValueError:   
             self.command_timeout = 30
         
+        with self._cursor() as cur:
+            pass
+        
     def _cursor(self):
         if self.connection is None:
             self.connection = Database.connect(

File sqlserver_ado/operations.py

 
         # SQL Server 2005 doesn't support microseconds
         if self.is_sql2005:
-           value = value.replace(microseconds=0)
+           value = value.replace(microsecond=0)
 
         return value