<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>LICENSE.txt</filename>
    </added>
    <added>
      <filename>src/cnxninfo.cpp</filename>
    </added>
    <added>
      <filename>src/cnxninfo.h</filename>
    </added>
    <added>
      <filename>src/dbspecific.h</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 include src\*.h
 include src\*.cpp
 include tests\*
-include README.txt
+include *.txt
 prune setup.cfg
 
 include web\*</diff>
      <filename>MANIFEST.in</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
 #!/usr/bin/python
 
 import sys, os, re
-from distutils.core import setup, Command
+from distutils.core import setup
 from distutils.extension import Extension
 from distutils.errors import *
 from os.path import exists, abspath, dirname, join, isdir
 
+
 OFFICIAL_BUILD = 9999
 
 def main():
 
     version_str, version = get_version()
 
-    files = [ 'pyodbcmodule.cpp', 'cursor.cpp', 'row.cpp', 'connection.cpp', 'buffer.cpp', 'params.cpp', 'errors.cpp', 'getdata.cpp' ]
-    files = [ abspath(join('src', f)) for f in files ]
+    files = [ abspath(join('src', f)) for f in os.listdir('src') if f.endswith('.cpp') ]
     libraries = []
 
     extra_compile_args = None
@@ -25,9 +25,8 @@ def main():
         libraries.append('odbc32')
         extra_compile_args = [ '/W4' ]
 
-        # Add debugging symbols
-        extra_compile_args = [ '/W4', '/Zi', '/Od' ]
-        extra_link_args    = [ '/DEBUG' ]
+        # extra_compile_args = [ '/W4', '/Zi', '/Od' ]
+        # extra_link_args    = [ '/DEBUG' ]
 
     elif os.environ.get(&quot;OS&quot;, '').lower().startswith('windows'):
         # Windows Cygwin (posix on windows)
@@ -43,6 +42,22 @@ def main():
         # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
         libraries.append('odbc')
 
+    macros = [ ('PYODBC_%s' % name, value) for name,value in zip(['MAJOR', 'MINOR', 'MICRO', 'BUILD'], version) ]
+
+    # This isn't the best or right way to do this, but I don't see how someone is supposed to sanely subclass the build
+    # command.
+    try:
+        sys.argv.remove('--assert')
+        macros.append(('PYODBC_ASSERT', 1))
+    except ValueError:
+        pass
+
+    try:
+        sys.argv.remove('--trace')
+        macros.append(('TRACE_ALL', 1))
+    except ValueError:
+        pass
+
     if exists('MANIFEST'):
         os.remove('MANIFEST')
 
@@ -58,7 +73,7 @@ def main():
 
            ext_modules = [ Extension('pyodbc', files,
                                      libraries=libraries,
-                                     define_macros = [ ('PYODBC_%s' % name, value) for name,value in zip(['MAJOR', 'MINOR', 'MICRO', 'BUILD'], version) ],
+                                     define_macros = macros,
                                      extra_compile_args=extra_compile_args,
                                      extra_link_args=extra_link_args
                                      ) ],
@@ -77,6 +92,7 @@ def main():
            download_url = 'http://github.com/pyodbc/pyodbc/tree/master')
 
 
+
 def get_version():
     &quot;&quot;&quot;
     Returns the version of the product as (description, [major,minor,micro,beta]).</diff>
      <filename>setup.py</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,8 @@
 #include &quot;cursor.h&quot;
 #include &quot;pyodbcmodule.h&quot;
 #include &quot;errors.h&quot;
+#include &quot;wrapper.h&quot;
+#include &quot;cnxninfo.h&quot;
 
 static char connection_doc[] =
     &quot;Connection objects manage connections to the database.\n&quot;
@@ -171,13 +173,9 @@ PyObject* Connection_New(PyObject* pConnectString, bool fAutoCommit, bool fAnsi)
         return 0;
     }
 
-    cnxn-&gt;hdbc                   = hdbc;
-    cnxn-&gt;searchescape           = 0;
-    cnxn-&gt;odbc_major             = 3;
-    cnxn-&gt;odbc_minor             = 50;
-    cnxn-&gt;nAutoCommit            = fAutoCommit ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF;
-    cnxn-&gt;supports_describeparam = false;
-    cnxn-&gt;datetime_precision     = 19; // default: &quot;yyyy-mm-dd hh:mm:ss&quot;
+    cnxn-&gt;hdbc         = hdbc;
+    cnxn-&gt;nAutoCommit  = fAutoCommit ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF;
+    cnxn-&gt;searchescape = 0;
 
     //
     // Initialize autocommit mode.
@@ -202,43 +200,19 @@ PyObject* Connection_New(PyObject* pConnectString, bool fAutoCommit, bool fAnsi)
     // Gather connection-level information we'll need later.
     //
 
-    // FUTURE: Measure performance here.  Consider caching by connection string if necessary.
+    Object info(GetConnectionInfo(pConnectString, cnxn));
 
-    char szVer[20];
-    SQLSMALLINT cch = 0;
-    if (SQL_SUCCEEDED(SQLGetInfo(cnxn-&gt;hdbc, SQL_DRIVER_ODBC_VER, szVer, _countof(szVer), &amp;cch)))
+    if (!info.IsValid())
     {
-        char* dot = strchr(szVer, '.');
-        if (dot)
-        {
-            *dot = '\0';
-            cnxn-&gt;odbc_major=(char)atoi(szVer);
-            cnxn-&gt;odbc_minor=(char)atoi(dot + 1);
-        }
-    }
-
-    char szYN[2];
-    if (SQL_SUCCEEDED(SQLGetInfo(cnxn-&gt;hdbc, SQL_DESCRIBE_PARAMETER, szYN, _countof(szYN), &amp;cch)))
-    {
-        cnxn-&gt;supports_describeparam = szYN[0] == 'Y';
+        Py_DECREF(cnxn);
+        return 0;
     }
 
-    // What is the datetime precision?  This unfortunately requires a cursor (HSTMT).
-
-    HSTMT hstmt = 0;
-    if (SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_STMT, cnxn-&gt;hdbc, &amp;hstmt)))
-    {
-        if (SQL_SUCCEEDED(SQLGetTypeInfo(hstmt, SQL_TYPE_TIMESTAMP)) &amp;&amp; SQL_SUCCEEDED(SQLFetch(hstmt)))
-        {
-            SQLINTEGER columnsize;
-            if (SQL_SUCCEEDED(SQLGetData(hstmt, 3, SQL_INTEGER, &amp;columnsize, sizeof(columnsize), 0)))
-            {
-                cnxn-&gt;datetime_precision = columnsize;
-            }
-        }
-
-        SQLFreeStmt(hstmt, SQL_CLOSE);
-    }
+    CnxnInfo* p = (CnxnInfo*)info.Get();
+    cnxn-&gt;odbc_major             = p-&gt;odbc_major;
+    cnxn-&gt;odbc_minor             = p-&gt;odbc_minor;
+    cnxn-&gt;supports_describeparam = p-&gt;supports_describeparam;
+    cnxn-&gt;datetime_precision     = p-&gt;datetime_precision;
 
     return reinterpret_cast&lt;PyObject*&gt;(cnxn);
 }</diff>
      <filename>src/connection.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,13 @@
 
-/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
- * documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so.
- * 
- * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+// documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so.
+// 
+// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #ifndef CONNECTION_H
 #define CONNECTION_H</diff>
      <filename>src/connection.h</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,7 @@
 #include &quot;params.h&quot;
 #include &quot;errors.h&quot;
 #include &quot;getdata.h&quot;
+#include &quot;dbspecific.h&quot;
 
 enum
 {
@@ -171,6 +172,7 @@ PythonTypeFromSqlType(const SQLCHAR* name, SQLSMALLINT type)
         break;
         
     case SQL_TYPE_TIME:
+    case SQL_SS_TIME2:          // SQL Server 2008+
         pytype = (PyObject*)PyDateTimeAPI-&gt;TimeType;
         break;
         </diff>
      <filename>src/cursor.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@
 #include &quot;cursor.h&quot;
 #include &quot;connection.h&quot;
 #include &quot;errors.h&quot;
+#include &quot;dbspecific.h&quot;
 
 void GetData_init()
 {
@@ -481,6 +482,22 @@ GetDataDouble(Cursor* cur, int iCol)
     return PyFloat_FromDouble(value);
 }
 
+static PyObject*
+GetSqlServerTime(Cursor* cur, int iCol)
+{
+    SQL_SS_TIME2_STRUCT value;
+    
+    SQLLEN cbFetched = 0;
+
+    if (!SQL_SUCCEEDED(SQLGetData(cur-&gt;hstmt, (SQLSMALLINT)(iCol+1), SQL_C_BINARY, &amp;value, sizeof(value), &amp;cbFetched)))
+        return RaiseErrorFromHandle(&quot;SQLGetData&quot;, cur-&gt;cnxn-&gt;hdbc, cur-&gt;hstmt);
+
+    if (cbFetched == SQL_NULL_DATA)
+        Py_RETURN_NONE;
+
+    int micros = value.fraction / 1000; // nanos --&gt; micros
+    return PyTime_FromTime(value.hour, value.minute, value.second, micros);
+}
 
 static PyObject*
 GetDataTimestamp(Cursor* cur, int iCol)
@@ -498,15 +515,16 @@ GetDataTimestamp(Cursor* cur, int iCol)
     switch (cur-&gt;colinfos[iCol].sql_type)
     {
     case SQL_TYPE_TIME:
-        return PyTime_FromTime(value.hour, value.minute, value.second, 0);
-
+    {
+        int micros = value.fraction / 1000; // nanos --&gt; micros
+        return PyTime_FromTime(value.hour, value.minute, value.second, micros);
+    }
+    
     case SQL_TYPE_DATE:
         return PyDate_FromDate(value.year, value.month, value.day);
     }
 
-    // The fraction field is in nanoseconds.
-    int micros = value.fraction / 1000;
-
+    int micros = value.fraction / 1000; // nanos --&gt; micros
     return PyDateTime_FromDateAndTime(value.year, value.month, value.day, value.hour, value.minute, value.second, micros);
 }
 
@@ -566,6 +584,9 @@ GetData(Cursor* cur, Py_ssize_t iCol)
     case SQL_TYPE_TIME:
     case SQL_TYPE_TIMESTAMP:
         return GetDataTimestamp(cur, iCol);
+
+    case SQL_SS_TIME2:
+        return GetSqlServerTime(cur, iCol);
     }
 
     return RaiseErrorV(&quot;HY106&quot;, ProgrammingError, &quot;ODBC SQL type %d is not yet supported.  column-index=%zd  type=%d&quot;,</diff>
      <filename>src/getdata.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@
 #include &quot;buffer.h&quot;
 #include &quot;wrapper.h&quot;
 #include &quot;errors.h&quot;
+#include &quot;dbspecific.h&quot;
 
 struct ParamDesc
 {
@@ -350,6 +351,7 @@ static const char* SqlTypeName(SQLSMALLINT n)
         _MAKESTR(SQL_TYPE_DATE);
         _MAKESTR(SQL_TYPE_TIME);
         _MAKESTR(SQL_TYPE_TIMESTAMP);
+        _MAKESTR(SQL_SS_TIME2);
     }
     return &quot;unknown&quot;;
 }
@@ -564,7 +566,7 @@ static bool BindParam(Cursor* cur, int iParam, const ParamDesc* pDesc, PyObject*
             // (How many leading digits do we want to keep?  With SQL Server 2005, this should be 3: 123000000)
             int keep = (int)pow(10.0, 9-min(9, precision));
             value-&gt;fraction = value-&gt;fraction / keep * keep;
-            decimalDigits = precision;
+            decimalDigits = (SQLSMALLINT)precision;
         }
 
         fSqlType = SQL_TIMESTAMP;</diff>
      <filename>src/params.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,7 @@
 #ifdef _MSC_VER
 #include &lt;windows.h&gt;
 #include &lt;malloc.h&gt;
+#pragma warning(disable: 4127) // &quot;conditional expression is constant&quot; testing compilation constants
 typedef __int64 INT64;
 typedef unsigned __int64 UINT64;
 #else</diff>
      <filename>src/pyodbc.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,8 @@
 #include &quot;wrapper.h&quot;
 #include &quot;errors.h&quot;
 #include &quot;getdata.h&quot;
+#include &quot;cnxninfo.h&quot;
+#include &quot;dbspecific.h&quot;
 
 #include &lt;time.h&gt;
 #include &lt;stdarg.h&gt;
@@ -196,6 +198,7 @@ static bool import_types()
     OurTimeType     = PyDateTimeAPI-&gt;TimeType;
 
     Cursor_init();
+    CnxnInfo_init();
     GetData_init();
 
     PyObject* decimalmod = PyImport_ImportModule(&quot;decimal&quot;);
@@ -499,6 +502,7 @@ static const ConstantDef aConstants[] = {
     MAKECONST(SQL_TYPE_DATE),
     MAKECONST(SQL_TYPE_TIME),
     MAKECONST(SQL_TYPE_TIMESTAMP),
+    MAKECONST(SQL_SS_TIME2),
     MAKECONST(SQL_INTERVAL_MONTH),
     MAKECONST(SQL_INTERVAL_YEAR),
     MAKECONST(SQL_INTERVAL_YEAR_TO_MONTH),
@@ -736,7 +740,7 @@ initpyodbc()
 
     ErrorInit();
 
-    if (PyType_Ready(&amp;ConnectionType) &lt; 0 || PyType_Ready(&amp;CursorType) &lt; 0 || PyType_Ready(&amp;RowType) &lt; 0)
+    if (PyType_Ready(&amp;ConnectionType) &lt; 0 || PyType_Ready(&amp;CursorType) &lt; 0 || PyType_Ready(&amp;RowType) &lt; 0 || PyType_Ready(&amp;CnxnInfoType) &lt; 0)
         return;
 
     pModule = Py_InitModule4(&quot;pyodbc&quot;, pyodbc_methods, module_doc, NULL, PYTHON_API_VERSION);</diff>
      <filename>src/pyodbcmodule.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,8 @@ public:
         return *this;
     }
 
+    bool IsValid() const { return p != 0; }
+
     PyObject* Detach()
     {
         PyObject* pT = p;</diff>
      <filename>src/wrapper.h</filename>
    </modified>
    <modified>
      <diff>@@ -64,6 +64,14 @@ class SqlServerTestCase(unittest.TestCase):
         unittest.TestCase.__init__(self, method_name)
         self.connection_string = connection_string
 
+    def get_sqlserver_version(self):
+        &quot;&quot;&quot;
+        Returns the major version: 8--&gt;2000, 9==2005, 10 == SS2008
+        &quot;&quot;&quot;
+        self.cursor.execute(&quot;exec master..xp_msver 'ProductVersion'&quot;)
+        row = self.cursor.fetchone()
+        return int(row.Character_Value.split('.', 1)[0])
+
     def setUp(self):
         self.cnxn   = pyodbc.connect(self.connection_string)
         self.cursor = self.cnxn.cursor()
@@ -75,6 +83,13 @@ class SqlServerTestCase(unittest.TestCase):
             except:
                 pass
 
+        for i in range(3):
+            try:
+                self.cursor.execute(&quot;drop procedure proc%d&quot; % i)
+                self.cnxn.commit()
+            except:
+                pass
+
         self.cnxn.rollback()
 
     def tearDown(self):
@@ -498,116 +513,78 @@ class SqlServerTestCase(unittest.TestCase):
         self.assertEqual(value, result)
 
 
-    # Not supported in 2005.  Get 2008 beta.
-    # def test_date(self):
-    #     value = date.today()
-    #  
-    #     self.cursor.execute(&quot;create table t1(dt datetime)&quot;)
-    #     self.cursor.execute(&quot;insert into t1 values (?)&quot;, value)
-    #  
-    #     result = self.cursor.execute(&quot;select dt from t1&quot;).fetchone()[0]
-    #     self.assertEquals(value, result)
-
-    # Not supported in 2005.  Get 2008 beta.
-    # def test_time(self):
-    #     value = datetime.now().time()
-    #  
-    #     self.cursor.execute(&quot;create table t1(dt datetime)&quot;)
-    #     self.cursor.execute(&quot;insert into t1 values (?)&quot;, value)
-    #  
-    #     result = self.cursor.execute(&quot;select dt from t1&quot;).fetchone()[0]
-    #     self.assertEquals(value, result)
+    def test_date(self):
+        ver = self.get_sqlserver_version()
+        if ver &lt; 10:            # 2008 only
+            return              # so pass / ignore
+
+        value = date.today()
+     
+        self.cursor.execute(&quot;create table t1(d date)&quot;)
+        self.cursor.execute(&quot;insert into t1 values (?)&quot;, value)
+     
+        result = self.cursor.execute(&quot;select d from t1&quot;).fetchone()[0]
+        self.assertEquals(value, result)
+
+
+    def test_time(self):
+        ver = self.get_sqlserver_version()
+        if ver &lt; 10:            # 2008 only
+            return              # so pass / ignore
+
+        value = datetime.now().time()
+        
+        # We aren't yet writing values using the new extended time type so the value written to the database is only
+        # down to the second.
+        value = value.replace(microsecond=0)
+         
+        self.cursor.execute(&quot;create table t1(t time)&quot;)
+        self.cursor.execute(&quot;insert into t1 values (?)&quot;, value)
+         
+        result = self.cursor.execute(&quot;select t from t1&quot;).fetchone()[0]
+        self.assertEquals(value, result)
 
     #
     # stored procedures
     #
 
+    # def test_callproc(self):
+    #     &quot;callproc with a simple input-only stored procedure&quot;
+    #     pass
+
     def test_sp_results(self):
         self.cursor.execute(
             &quot;&quot;&quot;
-            if exists (select * from dbo.sysobjects where id = object_id(N'[test_select]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-            drop procedure [dbo].[test_select]
-            &quot;&quot;&quot;)
-        self.cursor.execute(
-            &quot;&quot;&quot;
-            Create procedure test_select
+            Create procedure proc1
             AS
               select top 10 name, id, xtype, refdate
               from sysobjects
             &quot;&quot;&quot;)
-        rows = self.cursor.execute(&quot;exec test_select&quot;).fetchall()
+        rows = self.cursor.execute(&quot;exec proc1&quot;).fetchall()
         self.assertEquals(type(rows), list)
         self.assertEquals(len(rows), 10) # there has to be at least 10 items in sysobjects
         self.assertEquals(type(rows[0].refdate), datetime)
 
-    # Note: This will fail because the last thing in the stored procedure is an implicit drop, not a select!
-    #
-    def test_sp_results_from_temp(self):
-        self.cursor.execute(
-            &quot;&quot;&quot;
-            if exists (select * from dbo.sysobjects where id = object_id(N'[test_select]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-            drop procedure [dbo].[test_select]
-            &quot;&quot;&quot;)
-        self.cursor.execute(
-            &quot;&quot;&quot;
-            Create procedure test_select
-            AS
-              select top 10 name, id, xtype, refdate
-              into #tmptable
-              from sysobjects
 
-              select * from #tmptable
-            &quot;&quot;&quot;)
-        # Because we're using a temporary table, two results are returned:
-        #
-        #   (1) the results of the drop table, which is the number of rows in the temporary table
-        #   (2) the result set from the select.
-        #
-        # Ignore the first result (which is just cursor.rowcount)
-
-        self.cursor.execute(&quot;exec test_select&quot;)
-        self.assertEquals(self.cursor.rowcount, 10) # (1)
-        self.assert_(self.cursor.description is None)
-
-        self.assert_(self.cursor.nextset())         # (2)
-        self.assert_(self.cursor.description is not None)
-        self.assert_(len(self.cursor.description) == 4)
-
-        rows = self.cursor.fetchall()
-        self.assertEquals(type(rows), list)
-        self.assertEquals(len(rows), 10) # there has to be at least 10 items in sysobjects
-        self.assertEquals(type(rows[0].refdate), datetime)
+    def test_sp_results_from_temp(self):
 
+        # Note: I've used &quot;set nocount on&quot; so that we don't get the number of rows deleted from #tmptable.
+        # If you don't do this, you'd need to call nextset() once to skip it.
 
-    def test_sp_results_from_temp2(self):
         self.cursor.execute(
             &quot;&quot;&quot;
-            if exists (select * from dbo.sysobjects where id = object_id(N'[test_select]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-            drop procedure [dbo].[test_select]
-            &quot;&quot;&quot;)
-        self.cursor.execute(
-            &quot;&quot;&quot;
-            Create procedure test_select
+            Create procedure proc1
             AS
+              set nocount on
               select top 10 name, id, xtype, refdate
               into #tmptable
               from sysobjects
 
               select * from #tmptable
             &quot;&quot;&quot;)
-        # Because we're using a temporary table, two results are returned:
-        #
-        #   (1) the results of the drop table, which is the number of rows in the temporary table
-        #   (2) the result set from the select.
-        #
-        # Ignore the first result (which is just cursor.rowcount)
-
-        # Note: Try dynamically figuring out whether nextset() is required or not.
-
-        self.cursor.execute(&quot;exec test_select&quot;)
-        while self.cursor.description is None:
-            if not self.cursor.nextset():
-                raise SystemExit('No result set!')
+        self.cursor.execute(&quot;exec proc1&quot;)
+        self.assert_(self.cursor.description is not None)
+        self.assert_(len(self.cursor.description) == 4)
 
         rows = self.cursor.fetchall()
         self.assertEquals(type(rows), list)
@@ -618,13 +595,9 @@ class SqlServerTestCase(unittest.TestCase):
     def test_sp_results_from_vartbl(self):
         self.cursor.execute(
             &quot;&quot;&quot;
-            if exists (select * from dbo.sysobjects where id = object_id(N'[test_select]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-            drop procedure [dbo].[test_select]
-            &quot;&quot;&quot;)
-        self.cursor.execute(
-            &quot;&quot;&quot;
-            Create procedure test_select
+            Create procedure proc1
             AS
+              set nocount on
               declare @tmptbl table(name varchar(100), id int, xtype varchar(4), refdate datetime)
 
               insert into @tmptbl
@@ -633,17 +606,7 @@ class SqlServerTestCase(unittest.TestCase):
 
               select * from @tmptbl
             &quot;&quot;&quot;)
-        # Because we're using a temporary table, two results are returned:
-        #
-        #   (1) the results of the drop table, which is the number of rows in the temporary table
-        #   (2) the result set from the select.
-        #
-        # Ignore the first result (which is just cursor.rowcount)
-        
-        self.cursor.execute(&quot;exec test_select&quot;)
-        self.assertEquals(self.cursor.rowcount, 10) # (1)
-        self.assert_(self.cursor.nextset())         # (2)
-
+        self.cursor.execute(&quot;exec proc1&quot;)
         rows = self.cursor.fetchall()
         self.assertEquals(type(rows), list)
         self.assertEquals(len(rows), 10) # there has to be at least 10 items in sysobjects</diff>
      <filename>tests/sqlservertests.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bbb51c1a20c0eaa0923e2e0f7767913575237ce7</id>
    </parent>
  </parents>
  <author>
    <name>Michael Kleehammer</name>
    <email>michael@kleehammer.com</email>
  </author>
  <url>http://github.com/mkleehammer/pyodbc/commit/04d8111b80fb00cae4c2677b1bb1ae8e20fec02c</url>
  <id>04d8111b80fb00cae4c2677b1bb1ae8e20fec02c</id>
  <committed-date>2008-10-12T17:01:43-07:00</committed-date>
  <authored-date>2008-10-12T17:01:43-07:00</authored-date>
  <message>Added SQL Server 2008 date/time extensions support.  Now caches connection info.

The connection info is in preparation for querying even more info per connection to implement
Cursor.call

Fixed the setup.py file so it doesn't build a debug library all the time.  You can add --assert
and --trace to turn those on instead of modifying pyodbc.h.

Also added a license file (feature request).</message>
  <tree>5774fc0e49a2f59df854f9834a9f38efb5d62a1b</tree>
  <committer>
    <name>Michael Kleehammer</name>
    <email>michael@kleehammer.com</email>
  </committer>
</commit>
