pywin32 / adodbapi /

The default branch has multiple heads

Filename Size Date modified Message
22 B
57.1 KB
25.8 KB
4.9 KB

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

Home page: <>

* 100% DB-API 2.0 compliant. 
* Includes pyunit testcases that describes how to use the module.  
* Fully implemented in Python. 
* Licensed under the LGPL license, which means that it can be used freely even in commercial programs subject to certain restrictions. 
* Supports eGenix mxDateTime, Python 2.3 datetime module and Python time module.

* C Python 2.3 or higher
 and pywin32 (Mark Hammond's python for windows extensions.)
 Note: as of 2.1.1, adodbapi is included in pywin32 versions 211 and later. 
 Iron Python 2.0 or higher. 

NOTE: ...........
If you do not like the new default operation of returning Numeric columns as decimal.Decimal,
you can select other options by the user defined convertion feature. 
        adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtString
        adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtFloat
	adodbapi.variantConversions[adodbapi.adNumeric] = my_convertion_function

whats new in version 2.2.2
1. Works with Iron Python 2.0RC1 (passes all tests except BINARY columns and old python time date conversion.)
2. Passes all dbapi20 tests (All errors and warnings are now defined for the connection object.)
3. Adds predefined conversion functions cvtBuffer and cvtUnicode if you want to use them.

Whats new in version 2.2.1
1. Bugfix for v2.1 item 6: but do not correct the string length if the output column is not a string.

Whats new in version 2.2
1. Runs on Iron Python 2.0b4 with a few restrictions. It will not handle Longs or BLOB correcly, 
   and has some date/time problems (using the "time" module as opposed to "datetime").
   Bug reports have been submitted to Iron Python, which, if fixed, will remove all restrictions.
2. More agressive at making sure to retrieve Numeric and Currency colums as decimal.Decimal.
3. Has a new conversion module. To make Numerics retrieve as strings, execute:
       adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtString
4. Switch to new-style classes and eliminate string exceptions.
5. Lots of cleanup in the code and the unit test.
6. More agressive at determining .rowcount after an operation.

Whats new in version 2.1.1?
1. Bugfix so nextset() will work even if a rowset is empty [ Bob Kline ]
2. Bugfix to call CoInitailize() before calling Dispatch() [ Adam Vandenberg ]

Whats new in version 2.1?
1. Use of Decimal.decimal data type for currency and numeric data. [ Cole ]
2. add optional timeout parameter to the connect method i.e.: 
      adodbapi.connect(string,timeout=nuberOfSeconds)  [thanks to: Patrik Simons]
3. improved detection of underlying transaction support [ Thomas Albrecht ]
4. fixed record set closing bug and adoRowIDtype [ Erik Rose ]
5. client-side cursoring [ Erik Rose ]
6. correct string length for qmark parameter substitution [ Jevon a.k.a. Guybrush Threepwood ]
7. try-multiple-strategy loop replaced by other logic. [ Cole ]
8. correct error code raised when next recordset not available. [ ekelund ]
9. numerous changes in unit test (including test against mySQL)

Whats new in version 2.0.1?
Added missing file so it installs correctly.

Whats new in version 2.0?
1. Improved performance through GetRows method.
2. Flexible date conversions. 
   Supports eGenix mxExtensions, python time module and python 2.3 datetime module.
3. More exact mappings of numeric datatypes. 
4. User defined conversions of datatypes through "plug-ins".
5. Improved testcases, not dependent on Northwind data.
6. Works with Microsoft Access currency datatype.
7. Improved DB-API 2.0 compliance.
8. rowcount property works on statements Not returning records.
9. "Optional" error handling extension, see DB-API 2.0 specification.

This version will be installed as part of the win32 package.

Authors (up to version 2.0.1)
Henrik Ekelund, 
Jim Abrams.
Bjorn Pettersen.

Author (version 2.1 and later)
Vernon Cole

LGPL, see

Start with:
read adodbapi/test/
and look at the test cases in adodbapi/test directory. 

Mailing lists
The adodbapi mailing lists have been deactivated. Submit comments to the 
pywin32 lists.

Relase history
2.2.2   Iron Python support complete.
2.2.1   Bugfix for string truncation
2.2     Code cleanup. added feature: "adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtString"
2.1.1	Bugfix to CoIninialize() and nextset()
2.1	Python 2.4 version
2.0     See what's new above.
1.0.1   Bug fix: Null values for numeric fields. Thanks to Tim Golden. 
1.0     the first release