Change Log

mxODBC Change Log

The change log includes a detailed description of all changes to this package in the recent releases.
Version: 3.0.4

Changes from 3.0.3 to 3.0.4

  • Fixed a problem with the Mac OS X builds not working on Intel Macs.
  • Added platform detection code to the prebuilt archives so that mismatches between the downloaded version and the installation platform are not reported to the user instead of causing a compilation errors.

Changes from 3.0.2 to 3.0.3

  • Fixed a bug in print_resultset() due to a missing import in one of the modules.
  • Added native iterator support to mxODBC cursor objects.
  • Added a note to the documentation on hidden module dependencies when wrapping mxODBC into applications using py2exe.
  • Fixed issues with prebuilt Mac OS X builds not installing on some Mac OS X versions.

Changes from 3.0.1 to 3.0.2

  • mxODBC now has better support for using TEXT and VARCHAR columns with binary data, esp. for database drivers which require the Python type binding mode, such as the FreeTDS ODBC driver.
  • Fixed a problem with the prebuilt packages not installing on Mac OS X.
  • Corrected version number of mx.ODBC to show '3.0.2' instead of '2.1.0'
  • Added work-around for crashing MySQL ODBC 3.51.20 driver
  • Added work-around for Informix ODBC driver complaining about timestamp formats
  • mxODBC now includes the license verification module dependencies, so you no longer have to add them manually when using e.g. py2exe
  • Added a note to the documentation on hidden module dependencies when wrapping mxODBC into applications using py2exe.
  • Added work-around for SQL Server 2005 to be able to retrieve >1MB Unicode data when running mxODBC in UNICODE_STRINGFORMAT string format mode.
  • Enhanced the .stringformat documentation to more clearly state how the conversion processes work.
  • mxODBC .stringformat set to UNICODE_STRINGFORMAT did not convert Unicode to 8-bit strings when run in Python type binding mode.
  • Added Python datetime support on Python 2.3
  • Added Python 2.6 support on Windows (using VC9)
  • mxSetup prebuilt archives no longer need to use "... build --skip ..." to skip the build process. The build command is now smart enough to detect, check and automatically use a build pickle and the prebuilt format.
  • Fixed a problem in mxSetup that caused the uninstall command not to work with prebuilt packages. Thanks to Wouter van Atteveldt for pointing out the problem.

Changes from 3.0.0 to 3.0.1

  • Fixed a bug in the stringformat setting that could cause the stringformat setting not to affect the SQL type used in binding parameters
  • Fixed a bug in the way binding sets the length information for Unicode data when running in Python type mode
  • Use the VAR-variants of character SQL types in favor of the plain SQL type codes to work-around issues with padding in some drivers (notably the SQL Server ODBC driver)
  • Added better documentation for cursor.errorhandler and how this inherits from connection.errorhandler
  • Added cursor.errorhandler example to the documentation
  • Updated the documentation of the SQL types used in both SQL type and Python type binding mode

Changes from 2.0.7 to 3.0.0

  • Added cursor.callproc() with support for input parameters.
  • Added cursor.nextset().
  • Added aliasing support for platform specific ODBC managers: mx.ODBC.Manager is aliased to the most commonly used ODBC manager for the platform running mxODBC (the Windows subpackage on Windows, iODBC on all other platforms).
  • Added new .messages list attribute to both connection and cursor objects. All error and warning messages (tuples (exception class, exception value)) will be appended to these lists. The lists are automatically cleared by most cursor and connection methods except the fetch methods and the connection info/option methods.
  • Changed the type names and repr() output of connections and cursor type objects to better reflect the used interface (e.g on Windows the type name will be "mx.ODBC.Windows cursor" rather than just "mxODBC Cursor").
  • Rearranged the code for fetching SMALLINTs, TINYINTs and BITs to do the fetching using a C short rather than a C long. Some ODBC drivers are buggy in that they fail to correctly convert these small integers to longs.
  • Added documentation of the exception value layout.
  • Added all exception objects (including the Warning exception) as attributes to the connection objects. This enables writing code which can catch exceptions independent of the mxODBC subpackage being used.
  • Added some support for CYGWIN. Thanks to Steve Holden for suggesting the needed tweaks.
  • Added cursor.connection attribute which allows accessing the Connection object used by the cursor.
  • Fixed parameter input binding to not change the SQL type due to None parameters after having already bound a different type. This should solve the problem with some Oracle drivers complaining about this.
  • Added cursor.rownumber providing a way to query the current result set position of the cursor.
  • Added cursor.getcursoroption() which can be used to query low-level details about the cursor such as timeouts etc.
  • Added cursor.scroll() which enables result set scrolling.
  • cursor.executemany() now accepts sequences of sequences as required by API 2.0.
  • Changed: cursor.execute() no longer accepts list of tuples as parameter. Use cursor.executemany() instead.
  • The new SAP DB support is now official.
  • Added extensive documentation to the cursor catalog methods.
  • Changed the cursor.freeset() method name to cursor.flush(). The old name is still available for backward compatibility.
  • Fixed bug in DataSources() work-around for iODBC which caused the DSN names to be truncated to two characters.
  • Changed the SQL types used for passing input data to the ODBC driver using .executeXXX() methods in Python type binding mode. Instead of defaulting to SQL_CHAR and SQL_BINARY, these now use the SQL types SQL_VARCHAR, SQL_VARBINARY.
  • Added better support for Python type bindings: strings are now analyzed for binary content and then bound in binary mode if needed.
  • Added new connection attributes .dbms_name, .dbms_version, .driver_name, .driver_version.
  • Added new cursor methods .next() and .__iter__() which enable cursors to be used as iterators in Python 2.2.
  • Changed quite a few SQLSTATE to exception class mappings and added new mappings for ODBC 3.x. If you need to force usage of other mappings, please assign these mappings to the modules scope dictionary errorclass.
  • Added user definable error handlers as defined in the DB API 2.0 extensions.
  • Changed the Windows source files from using the .cpp extension to the .c extension. This should avoid confusion with non-VC compilers since mxODBC does not include any C++ code. It also works nice with distutils.
  • Added more SQL_* symbols. The list now includes all integer symbols from ODBC 3.51 and many database specific extensions (including IBM DB2 extensions and MS SQL Server extensions).
  • Added new experimental subpackage mx.ODBC.FreeTDS which allows connecting to MS SQL Server from Unix. This is still far from even being called alpha due to the current lack of implementation support of many important ODBC APIs in the FreeTDS ODBC driver.
  • Changed: Exception classes of subpackages are now identical to the base classes defined in mx.ODBC.Error. They are no longer defined on a per subpackage basis. This should make writing cross-database applications a little easier.
  • Updated the Solid subpackage from Solid 2.2 to Solid 3.52. This update involved several small tweaks to make the Solid ODBC driver happy.
  • Fixed a bug in the code for fetching Unicode BLOBs which caused NUL characters to be inserted into the resulting string.
  • Made the BLOB fetching code a little smarter to work around bugs in ODBC drivers which don't 0-terminate character data hunks (this resulted in missing bytes at 1024 byte boundaries).
  • Strings in Python binding mode will now bind as SQL_VARBINARY/SQL_LONGVARBINARY if necessary. Wrap them in buffer objects to always force binding them as VARBINARY data fields. This fixes compatibility problems with some ODBC drivers which don't support SQL type binding.
  • Integrated mxLicenseManager. In order for mxODBC to work, a file must be present in the mx/ODBC/ directory of the package.
  • Added work-around for binding large data chunks in Python binding mode. This solves a problem with EasySoft's Oracle ODBC driver. Unfortunately, the work-around oes not work for CLOB columns: if you pass in data with less than 256 bytes, an error is raised by the driver.
  • Added work-around for EasySoft driver to always bind using the SQL_LONGxxx types.
  • Fixed a typo in the FETCH_UNKNOWN_TYPES_AS_STRINGS and SEND_UNKNOWN_TYPES_AS_STRINGS compile time options.
  • Added work-around for bug in MS Access ODBC driver to always send at least sqllen=1 for bound parameters. It rejects parameters bound with sqllen=0 and issues an HY104 error.
  • Added statistics() API which allows checking the number of currently open connections and cursors.
  • Ported to Python 2.5 and tested with that version.
  • Fixed bugglet in mxODBC_UnicodeAsSQLWCHAR() where two parameters were switched, causing the buffer length to appear as string length.
  • Changed HY019 error mapping from InterfaceError to ProgrammingError: MS SQL Server returns this for integer overflow errors
  • PyNumber_Int() can return a Python long in Python 2.5 and later. Fixed mxODBC to deal with this case, so that binding to integer columns continues to work even if you pass in a Python long and the database requested an integer.
  • Fixed 64-bit integer binding: on 64-bit platforms, SQL_C_SLONG does not map to a 64-bit type, but a 32-bit type (weird, but true, and caused by the fact that Win64 works this way: longs on Win64 only have 32 bits).
  • Added test cases for BYTEA (PostgreSQL)
  • Added mapping of 22P06 to Warning to make the PostgreSQL driver work with BYTEA and binary data
  • Added test cases for NTEXT and NCHAR to the test suite. These two column data types are available in SQL Server and provide native Unicode storage.
  • Added work-around for bug in iODBC on 64-bit platforms: it sends 0xFFFFFFFF instead of -1 for NULL data columns
  • Added support for passing Unicode commands to .executeXXX().
  • Added optional support for the new Decimal type introduced in Python 2.4; recognize Decimal types on input
  • Added optional support for the datetime types introduced in Python 2.3; using the Python interface for Python 2.3 and the new C interface in Python 2.4; recognize datetime types on input
  • mxODBC now no longer request the .rowcount per default after each .executeXXX() call - some databases are very slow when it comes to finding out the true number of rows in the result set
  • Increased the default value of DEFAULT_LONG_SIZE to e.g. 32000 - this can make a big difference since it avoids network roundtrips in networked setup

Changes from 2.0.6 to 2.0.7:

  • Added Python 2.4 support.
  • Added UCS2 and UCS4 builds of the package.

Changes from 2.0.5 to 2.0.6:

  • Added DB-API attribute threadsafety.
  • Added Python 2.3 support.

Changes from 2.0.4 to 2.0.5:

  • Fixed a bug in the native Unicode handling code for long object columns. mxODBC now also supports reading and writing Unicode to and from longchar and ntext columns for MS SQL Server.

Changes from 2.0.3 to 2.0.4:

  • Enhanced compatiblity to Unicode-aware ODBC drivers such as the latest MS SQL Server and MS Access ODBC drivers. Exchanging native Unicode data with these drivers is now supported for input parameters and output data retrieved using the .fetchXXX() APIs. Catalog methods and other APIs do not support Unicode.
  • Rearranged the code for fetching SMALLINTs, TINYINTs and BITs to do the fetching using a C short rather than a C long. Some ODBC drivers are buggy in that they fail to correctly convert these small integers to longs.

Changes from 2.0.2 to 2.0.3:

  • Enhanced test script (mx.ODBC.Misc.test) to show available data sources for ODBC managers before connecting.
  • Added docs about usage of mxODBC with Thomas Heller's py2exe.
  • Added work-around for some ODBC drivers which don't initialize the buffers for small integers correctly. This lead to wrong results when reading data from SMALLINT columns with these drivers. Writing to these column types did not pose a problem. Thanks to Villiam Manera for bringing this to my attention again (mxODBC already included a hint to the problem, but no actual fix for it).

Changes from 2.0.1 to 2.0.2:

  • Added a new section on stored procedures to the docs. Thanks to Jim Vickroy for finding out about the usage of PRINT in MS SQL Server stored procedures.
  • Tested under Python 2.1.

Changes from 2.0.0 to 2.0.1:

  • Fixed the documentation w/r to debugging builds. The default configuration does contain the debugging code. See the debugging section for details on how to build a debugging version.
  • Changed handling of warnings during database connect: warnings will no longer be reported as exceptions. This should allow connects to e.g. MS SQL Server to work without having to recompile mxODBC on Windows.
  • Fixed a bug in the handling of direct execution (.executedirect()). Input parameters passed to .executedirect() will be bound using Python bindings.
  • Reverted a change introduced in 2.0.0 which prevered the ODBC 3.5 data types for date/time values over the old ones. The MS ODBC manager has massive problems with these, which cause all queries involving date/time columns to fail. mxODBC 2.0.1 will no again use the old type codes, which work fine with all ODBC drivers/managers.
  • Added experimental SAP DB support as new subpackage mx.ODBC.SAPDB.
  • Added more tests to the test script.