Skip to content
Commits on Sep 6, 2010
  1. Allocated own string for decimals.

    committed
    Was using str(decimal), but it can return items in exponential notation, which I'm not sure
    many databases would handle properly.
  2. More Unicode fixes. Updated mysql tests.

    Michael Kleehammer committed
Commits on Sep 5, 2010
  1. Issue 91: decimal fix; Completely reworked parameters; added leakcheck

    committed
    Fixed issue 91 - handling of decimals was incorrect (off by 1).  Added lots of SQL Server unit
    tests.
    
    To properly fix this, reworked and simplified parameter binding.  Instead of separating the
    memory requirement and the actual memory preparation, it is now performed in 1 step and stored
    in the new ParamInfo structures.
    
    I added a lot of optional malloc calls (not usually used), so I added a PYODBC_LEAK_CHECK
    parameter which causes pyodbc_malloc and pyodbc_free to track allocations.  This is not thread
    safe and is intended only for troubleshooting.
Commits on Sep 4, 2010
  1. Issue 86: getinfo reading into wrong data type.

    Michael Kleehammer committed with
    Was using PyArg_ParseTuple to read a long into a SQLUSMALLINT, which is completely wrong.
    Changed dadta type to unsigned long then cast as necessary later.
  2. Issue 83/90: Fixed manifest so sdist works on non-Windows.

    Michael Kleehammer committed with
  3. Added more decimal tests (which fail right now).

    Michael Kleehammer committed with
  4. Implemented Row comparisons.

    Michael Kleehammer committed with
  5. Issue 101: Added connect timeout keyword.

    Michael Kleehammer committed with
  6. Added user-defined conversions to the connection.

    Michael Kleehammer committed with
  7. UCS4 fixes; printf fixes;

    Michael Kleehammer committed with
    Fixes found with UCS4 Python and UCS2 SQLWCHAR (Fedora 13 64-bit).
    
    Connection code now uses common SQLWChar class too.
    
    Added pyodbc.UNICODE_SIZE and pyodbc.SQLWCHAR_SIZE to help troubleshoot problems.
    
    Fixed some printfs 64-bit problems.
  8. Reworked Unicode; changed version format; more Py_ssize_t

    committed
    Reworked Unicode support, properly differentiating between SQLWCHAR on the different platforms.
    This should fix a lot of the OS/X problems and perhaps Linux UCS4 build problems.
    
    Version format now includes the branch name if not 'master' or v<version>, allowing custom
    builds to be identified, such as v2unicode-2.1.8-beta03.
    
    Also tested with 64-bit Windows builds, so more Py_ssize_t warnings were found and corrected.
    
    Created TRACE macro to replace the #ifdefs sprinkled through the code.
Commits on Aug 28, 2010
  1. Modified decimal param binding; Updated varchar/longvarchar fix.

    committed
    Updated calculation of buffer size needed for binding decimals.  This shouldn't have any affect
    other than assertions - generally the old calculation added an extra character or two.
    
    The previous varchar/longvarchar fix used varchar max with Unicode instead of wvarchar.  Also
    updated unit tests.
Commits on Aug 26, 2010
Commits on Aug 20, 2010
  1. Fixed VARCHAR/LONGVARCHAR comparison bug.

    Michael Kleehammer committed
    As reported by Andy Hochhaus in the pyodbc group, SQL Server fails if you compare a
    SQL_LONGVARCHAR parameter with a varchar field.  Had been using a hardcoded 255 to determine
    when to switch from VARCHAR to LONGVARCHAR.  Now uses SQLGetTypeInfo to determine the maximum
    varchar and binary widths.  This will also help performance for programs that bind a lot of
    strings greater than 255 but less than their db's max varchar size.
Commits on Dec 31, 2009
  1. Issue 82: Crash on Windows if cursor freed after cnxn (sometimes)

    committed
    Crash due to using HSTMT while cleaning up parameters after the connection is
    closed.  Unfortunately I wasn't able to put together an easy test case without
    using the with statement like the reporter did.
  2. Fix: Writing None/NULL to binary column only worked if 1st parameter.

    committed
    SQL Server 2008 doesn't allow SQLDescribeParam calls once parameters have been
    bound.  This error caused the varchar default to be used instead of raising an
    error, which works for all columns except binary.  SS won't convert char to
    binary automatically.  Fix is to call describe for all NULL parameters before
    binding.
    
    Added test_none_param to SQL Server unit tests.
Commits on Sep 5, 2009
Commits on Aug 8, 2009
  1. Fix: Connection not really closed if autocommit is on.

    committed
    The close was incorrectly bundled with the rollback, which only happens if autocommit is not
    turned on (ensuring a rollback if an exception occurs).  This probably occurred when adding the
    begin/end allow threads macros everywhere.
Commits on May 14, 2009
  1. Issue 48: Patch to add SQL Server XML data type

    John Chandler committed with
Commits on Apr 19, 2009
  1. Removed *.rc file from setup, even on Windows. Requires Windows SDK.

    committed
    I'm trying to get this to build with only Visual Studio C++ Express, which does not come with
    rc.exe.  The rc file was really to get the versioninfo block into the Windows DLL, but since
    the extension is .pyd, it really isn't used anyway.  (Installers may use it, though?)  In the
    near future, I'll add the version manually using ctypes.
Commits on Mar 18, 2009
  1. Added Excel unit tests

    committed
  2. Added version command to setup.py

    Michael Kleehammer committed
  3. fix: Cursor.execute is supposed to always return the cursor

    Michael Kleehammer committed
    This may break backwards compatibility!  During the transition to 2.1.x, I was supposed to
    change Cursor.execute's return value, but I forgot.  Fixed and added unit tests.
  4. issue 36: Patch to force results to unicode

    Michael Kleehammer committed
    A fantastic patch from patrik.simons@neotide.fi which adds a unicode_results keyword to the
    connect function, forcing ANSI string values to be returned as unicode objects.
  5. issue 35: Building pyodbc with mingw32

    Michael Kleehammer committed
    I am trusting the submitter here -- I do not have mingw32 configured.
Something went wrong with that request. Please try again.