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.

Comments (0)

Files changed (2)


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


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