eGenix mxODBC 3.3.1 GA

eGenix mxODBC 3.3.1 GA

eGenix is pleased to announce the immediate availability of eGenix mxODBC 3.3.1 - Python ODBC Database Interface, with support for Python 2.4 - 2.7 on all major platforms.

Introduction

mxODBC provides an easy-to-use, high-performance, reliable and robust Python interface to ODBC compatible databases such as MS SQL Server, Oracle Database, IBM DB2 and Informix , Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more:

>>>   mxODBC Product Page

The eGenix mxODBC - Python ODBC Database Interface product is a commercial extension to our eGenix mx Base Distribution:

>>>   mx Base Distribution Page

News

The 3.3.1 release of our mxODBC is a patch level release of our popular Python ODBC Interface for Windows, Linux, Mac OS X and FreeBSD. It includes these enhancements and fixes:

Installation Enhancements

  • Added web installer package to the Python Package Index (PyPI) which simplifies installation.

    In addition to the usual ways of installing mxODBC, we have uploaded a web installer to PyPI, so that it is now also possible to use one of these installation methods on all supported platforms (Windows, Linux, FreeBSD, Mac OS X):
    • easy_install egenix-mxodbc via PyPI
    • pip install egenix-mxodbc via PyPI
    • egg reference in zc.buildout via PyPI
    • running "python setup.py install" in the unzipped web installer archive directory

    The web installer will automatically detect the platform and choose the right binary download package for you. All downloads are verified before installation.

Driver Compatibility

SQL Server

  • Fixed a problem with custom errorhandlers set at connection time, which could result in warnings not being ignored during connect. SQL Server raises such warnings during connect, so this fix will restore mxODBC 3.2 behavior for SQL Server.
  • Documented a solution for a problem with the SQL Server 2012 parser complaining about not being able to deduce types of some operations using more than one bound variable, e.g. "col1 >= ? + ?".

Teradata

  • Improved the Teradata ODBC driver setup instructions to address some common gotchas when setting up mxODBC to work with these drivers.
  • Fixed a problem with Teradata and the test suite which resulted in an error "[Teradata][ODBC Teradata Driver] Beyond SQL_ACTIVE_STATEMENTS limit". The driver needs an explicit call to cursor.flush() to close any open result sets before running commits or rollbacks.

Misc

  • Fixed a problem in cursor.getcolattributes() that caused errors to be ignored.
  • Added better protection against ODBC driver bugs in getenvattr().
  • Fixed an attribute error when using the NamespaceRowFactory function.
  • Fixed a deprecation warning when using the NamespaceRowFactory function.
  • Prepared mxODBC for two digit Python patch level numbers, ie. 2.7.10.
  • Fixed prebuilt archives to also work correctly with easy_install.
  • Added dependency on egenix-mx-base, so that easy_install and pip automatically install the mx Base package as well.
The complete list of changes is available on the mxODBC changelog page.

Features

mxODBC 3.3 was released on 2014-04-08. These are the highlights of the new release:

mxODBC 3.3 Release Highlights

Stored Procedures

  • mxODBC now has full support for input, output and input/output parameters in stored procedures and stored functions, allowing easy integration with existing databases systems.

User Customizable Row Objects

  • Added support for user customizable row objects by adding cursor/connection .rowfactory and .row constructor attributes. When set, these are used to wrap the normal row tuples returned by the .fetch*() methods into dynamically created row objects.
  • Added new RowFactory classes to support cursor.rowfactory and cursor.row. These allow dynamically creating row classes that provide sequence as well as mapping and attribute access to row fields - similar to what namedtuples  implement, but specific to result sets.

Fast Cursor Types

  • Switched to forward-only cursor types for all database backends, since this provides a much better performance for MS SQL Server and IBM DB2 drivers.
  • Added a new .cursortype attribute to allow adjusting and inspecting the ODBC cursor type to be used for an mxODBC cursor object. Default is to use forward-only cursors, but mxODBC also support several other useful cursor types such as static cursors with full support for result set scrolling.

mxODBC 3.3 Driver Compatibility Enhancements

Oracle

  • Added work-around for Oracle Instant Client to be able to use integer output parameters.
  • Added a work-around for Oracle Instant Client to have it return output parameters based on the input placeholder Python parameter types. It would otherwise return all parameters as strings.

MS SQL Server

  • mxODBC now defaults to 100ns connection.timestampresolution for MS SQL Server 2008 and later, and 1ms resolution for MS SQL server 2005 and earlier. This simplifies interfacing to SQL Server timestamp columns by preventing occasional precision errors.
  • Tested mxODBC successfully with new MS SQL Server Native Client 11 for Linux. Unicode connection strings still don't work, but everything else does.
  • Added documentation on how to use Kerberos with mxODBC and SQL Server fo authentication on both Windows and Linux.

Sybase ASE

  • Added work-around for the Sybase ASE ODBC driver, which doesn't always pass back NULL correctly to mxODBC on 64-bit Unix systems.
  • Changed the variable type binding mode default for the Sybase ASE ODBC driver from Python type binding to SQL type binding, which resolves issues with e.g. the Unicode support for that driver.

IBM DB2

  • Added work-around for the IBM DB2 ODBC driver, which doesn't always pass back NULL correctly to mxODBC on 64-bit Unix systems.

PostgreSQL

  • Added work-around to force Python type binding for the PostgreSQL ODBC drivers. More recent versions of the driver report supporting SQL type binding, but they don't implement it.
  • Added work-around to have PostgreSQL ODBC drivers properly work with binary data for BYTEA columns.

MySQL

  • mxODBC now supports native Unicode with the recent MySQL ODBC drivers - provided you use the Unicode variants of the drivers.
  • Changed the default binding mode for MySQL ODBC drivers to Python type binding. This works around a problem with date/time values when talking to MySQL 5.6 servers.
For the complete set of features, please have a look at the mxODBC product page.

Editions

mxODBC is available in these two editions:

  • The Professional Edition, which gives full access to all mxODBC features.
  • The Product Development Edition, which allows including mxODBC in applications you develop.
For a complete overview of the available editions, please see the product page.

Upgrading

Users are encouraged to upgrade to this latest mxODBC release to benefit from the new features and updated ODBC driver support.

We have taken special care not to introduce backwards incompatible changes, making the upgrade experience as smooth as possible.

Customers who have purchased mxODBC 3.3 licenses can continue to use their licenses with this patch level release.

For upgrade purchases, we will give out 20% discount coupons going from mxODBC 2.x to 3.3 and 50% coupons for upgrades from mxODBC 3.x to 3.3. Please contact the eGenix.com Sales Team with your existing license serials for details for an upgrade discount coupon.

If you want to try the new release before purchase, you can request 30-day evaluation licenses by visiting our web-site or writing to sales@egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need.

Downloads

Please visit the eGenix mxODBC product page for downloads, instructions on installation and documentation of the packages.

Note that in order to use the eGenix mxODBC product, you first need to install our open-source eGenix mx Base Distribution.

More Information

For more information on the eGenix.com Python products, licensing and download instructions, please write to sales@egenix.com.

PS: If you want to meet with eGenix at EuroPython 2014, please send an email and we can arrange a meeting.

Enjoy !

Marc-Andre Lemburg, eGenix.com

Published: 2014-07-09