[egenix-users] egenix mxodbc 3.3.1 and SQLAlchemy

M.-A. Lemburg mal at egenix.com
Wed May 13 14:22:22 CEST 2015

On 15.04.2015 18:00, M.-A. Lemburg wrote:
> Hi Vinay,
> the error you are seeing basically means that the ODBC driver
> does not return a correct .rowcount value. mxODBC does support
> .rowcount, but whether it actually works depends on the ODBC
> driver used to access the database and the database backend
> itself (several databases don't provide this information,
> since it is sometimes expensive to calculate).
> We can look into this, but would have to know which SQL Server
> version you are using, since different backend version behave
> differently.
> Also: Could you send the traceback you are getting. This
> will have a hint to what .rowcount returns.
> Do you have example code for the select failure with 0.9.0 ?
> Note that we do not maintain the SA backend for mxODBC.
> We do send licenses to Michael Bayer so that he can test
> with mxODBC (including for the 3.3 release).

Just as follow-up to this:

The FreeTDS ODBC driver had an issue supporting .rowcount
for SELECTs at the time we released 3.2, so the attributes
was fixed to -1 in order to not cause confusion by returning
wrong data.

We will check whether we can reenable the feature for more
recent FreeTDS driver versions.

The MS ODBC drivers for Windows and Linux only support
.rowcount for INSERTs and UPDATEs, but not for SELECTs.

In any case: it you can, please use the MS ODBC driver
for Linux instead of FreeTDS. The MS driver for Linux
is much more compatible to the MS driver for Windows
and provides access to more features than FreeTDS
at the moment.

On other platforms, you can also look at mxODBC Connect,
which allows you to always run with the MS SQL Server driver
for Windows, regardless of the platform your client is

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, May 13 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
2015-05-13: Released mxODBC Connect 2.1.3 ...     http://egenix.com/go75
2015-05-11: Released eGenix PyRun 2.1.0 ...       http://egenix.com/go74
2015-05-25: PyWaw Summit 2015, Warsaw, Poland ...          12 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list