Commits

adamv committed deb8fd6

* Fixed callproc setup test to actually create the SPROC.
* Removed some "if not supported" checking from nextset; SQL Server always supports this.

  • Participants
  • Parent commits b7aff71

Comments (0)

Files changed (3)

source/sqlserver_ado/dbapi.py

             self._raiseCursorError(Error, None)
             return None
 
-        try:
-            recordset = self.rs.NextRecordset()[0]
-            if recordset is not None:
-                self._description_from_recordset(recordset)
-                return True
-        except pywintypes.com_error, e:
-            self._raiseCursorError(NotSupportedError, e.args)
+        recordset = self.rs.NextRecordset()[0]
+        if recordset is None:
+            return None
+            
+        self._description_from_recordset(recordset)
+        return True
 
     def setinputsizes(self, sizes): pass
     def setoutputsize(self, size, column=None): pass

tests/api/dbapi20.py

         con = self._connect()
         try:
             cur = con.cursor()
+            self._callproc_setup(cur)
             # Execute and get new parameters
             values = cur.callproc('to_lower', ('FOO',))
             self.assertEqual(len(values),1, 'callproc didnt return the input values')
             cur.execute(arg)
     
     # This should create the "lower" sproc.
-    def _callproc_setup(self):
-        self._try_run(
+    def _callproc_setup(self, cur):
+        self._try_run2(cur,
             """IF OBJECT_ID(N'[dbo].[to_lower]', N'P') IS NOT NULL DROP PROCEDURE [dbo].[to_lower]""",
             """
 CREATE PROCEDURE to_lower