[IronPython] Announcing adodbapi version 2.4.0 -- with COLUMN NAME data access
vernondcole at gmail.com
Sat Jul 31 09:42:30 CEST 2010
Announcing a new version of adodbapi...
[ for those who may not know...
[ adodbapi is a pure Python package which fully implements the PEP-249
[ using Microsoft ADO/db.
[ It runs on CPython versions 2.3 and later, IronPython 2.6 and later,
[ or Python 3.0 and later.
I have often been frustrated by the need to count '?' marks for input
and remembering column numbers to get my SQL output.
This release fixes that by allowing the use of 'named' parameters as an
and by returning 'SQLrow' objects which allow the use of column names.
This version includes a distutils setup.py file, so installation is easy.
2) "cd" to the directory you just unzipped.
2) Execute the command:
python setup.py install
using the python distribution of your choice.
It even runs 2to3 automatically if you run it using a 3.n Python.
(Why didn't I do this years ago?)
NOTE: on Vista (and 7?) you must run setup.py using the administrator
account to install on IronPython,
because setup.py does not elevate privileges for the source installer.
(Distutils can create a stand-alone binary installer which does elevate
privileges, but that feature is not yet supported by IronPython because it
has no zip library.)
ALSO NOTE: I have _used_ this package with IronPython 2.7.A1, but not
_tested_ it, because 2.7's unittest package is broken.
Here's what's new............................
* adodbapi version 2.4.0 -- in this version,
"fetchall()" and "fetchmany()" return an SQLrows object
...which emulates a sequence of SQLrow objects.
"fetchone()" or the cursor's "next()" method return an SQLrow object.
An SQLrow object emulates a tuple of data fields.
An SQLrow object also appears to have an attribute for each column of
>>> import adodbapi
>>> myConnection = adodbapi.connection('someDSN')
>>> cur = myConnection.cursor()
>>> cur.execute("select name, rank, serialNumber from soldiers")
>>> row = cur.fetchone()
>>> assert row == row['name']
>>> assert row == row.rank
>>> rows = cur.fecthall()
>>> assert rows[4,'serialNumber'] == rows
* adodbapi version 2.3.0 -- this is includes major refactoring and
specifically adds features for django support, including the ability for
programmer to change ado's SQL "paramstyle" at run time to select between
'qmark', 'format' and 'named' methods of passing SQL parameters.
** also, in response to user requests, adodbapi will now use client-side
cursors by default. This will make rowcount and stored procedure return
parameter values more readily available.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users