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