[DB-SIG] adodbapi 2.3.0 (the django version) released

Vernon Cole vernondcole at gmail.com
Mon May 3 11:39:10 CEST 2010


Hello everyone.
  I have just uploaded the latest version of adodbapi. This version is
highly refactored following the work of Adam Vandenberg, and also has all of
the current user suggested patches. Both the Mercurial tree and the
downloadable zip files are updated.  (There is no fancy installer, just copy
the folder in your site-packages folder.) This has been tested using CPython
2.3, CPython 2.6, IronPython 2.6 (.NET 2) and IronPython 2.6(.NET 4),
accessing .mdb, MS-SQL and MySQL databases.  There is a separate .zip for
Python 3.1.
............
adodbapi

A Python DB-API 2.0 module that makes it easy to use Microsoft ADO
for connecting with databases and other data sources
using either CPython or IronPython.

Home page: <http://sourceforge.net/projects/adodbapi>

Features:
* 100% DB-API 2.0 compliant.
* Includes pyunit testcases that describe how to use the module.
* Fully implemented in Python.
* Licensed under the LGPL license.
* Supports eGenix mxDateTime, Python 2.3 datetime module and Python time
module.
* Supports multiple paramstyles: 'qmark' 'named' 'format'
............
Whats new in version 2.3.0    # note: breaking changes and default changes!
  This version is all about django support.  There are two targets:
    A) MS SQL database connections for mainstream django.
    B) running django on IronPython
   Thanks to Adam Vandenberg for the django modifications.
   The changes are:

1. the ado constants are moved into their own module: ado_consts
      This may break some old code, but Adam did it on his version and I
like the improvement in readability.
      Also, you get better documentation of some results, like convertion of
MS data type codes to strings:
       >>> ado_consts.adTypeNames[202]
       'adVarWChar'
       >>> ado_consts.adTypeNames[cursr.description[0][1]]
       'adWChar'
  ** deprecation warning: access to these constants as adodbapi.ad* will be
removed in the future **

2. will now default to client-side cursors. To get the old default, use
something like:
      adodbapi.adodbapi.defaultCursorLocation = ado_consts.adUseServer
  ** change in default warning **

3. Added ability to change paramstyle on the connection or the cursor:  (An
extension to the db api)
    Possible values for paramstyle are: 'qmark', 'named', 'format'. The
default remains 'qmark'.
    (SQL language in '%s' format or ':namedParameter' format will be
converted to '?' internally.)
    when 'named' format is used, the parameters must be in a dict, rather
than a sequence.
       >>>c = adodbapi.connect('someConnectionString',timeout=30)
       >>>c.paramstyle = 'spam'
           <<<will result in: adodbapi.NotSupportedError: paramstyle="spam"
not in:('qmark', 'named', 'format')>>>
  ** new extension feature **

4. Added abality to change the default paramstyle for adodbapi: (for django)
    >>> import adodbapi as Database
    >>> Database.paramstyle = 'format'
 ** new extension feature **

Whats new in version 2.2.7
1. Does not automagically change to mx.DateTime when mx package is
installed. (This by popular demand.)
   to get results in  mx.DateTime format, use:
      adodbapi.adodbapi.dateconverter =
adodbapi.adodbapi.mxDateTimeConverter
2. implements cursor.next()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/db-sig/attachments/20100503/ec6b49c4/attachment.html>


More information about the DB-SIG mailing list