[IronPython] Announcing adodbapi version 2.4.0 -- with COLUMN NAME data access
cenovsky at bakalari.cz
Sun Aug 1 10:08:38 CEST 2010
I have developed my internal tool for accessing SQL server and FoxPro
.dbf files. It is inspired by PEP 249 too but it uses
System.Data.OleDb.OleDbConnection (vfpoledb.dll). It's main goal is to
cover differences between SQL server and FoxPro.
If anybody is interested, let me know and I will try to make it public.
On 31.7.2010 9:42, Vernon Cole wrote:
> 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 option,
> and by returning 'SQLrow' objects which allow the use of column names.
> This version includes a distutils setup.py file, so installation is easy.
> 1) unzip
> 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 data.
> >>> 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 the
> programmer to change ado's SQL "paramstyle" at run time to select
> '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
> parameter values more readily available.
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users