Announcing a new version of adodbapi...

[ for those who may not know...
[ adodbapi is a pure Python package which fully implements the PEP-249
db-api
[ using Microsoft ADO/db.
[ It runs on CPython versions 2.3 and later, IronPython 2.6 and later,
[ or Python 3.0 and later.
http://sourceforge.net/projects/adodbapi

I have often been frustrated by the need to count '?' marks for input
parameters
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.
Just
  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:  you must have already installed pywin32. This will upgrade your
existing version.

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.
   therefore...
   >>> import adodbapi
   >>> myConnection = adodbapi.connection('someDSN')
   >>> cur = myConnection.cursor()
   >>> cur.execute("select name, rank, serialNumber from soldiers")
   >>> row = cur.fetchone()
   >>> assert row[0] == row['name']
   >>> assert row[1] == row.rank
   >>> rows = cur.fecthall()
   >>> assert rows[4,'serialNumber'] == rows[4][2]

* 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 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.
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to