[DB-SIG] ANN: adodbapi 2.0

Henrik Ekelund henrik.ekelund at vpd.se
Mon May 5 14:31:19 EDT 2003


Yes. It can convert it any way you want.
By default "Currency" is mapped to a function cvtMoney that returns floats, and "decimal" is left untouched as a string. 

Do like this if you want to receive the raw data (a tuple) of a currency
field:
   adodbapi.variantConversions[adCurrency]=adodbapi.identity 

You can also specify exactly how you want "decimal" and "numeric" handled by making your own converter:

   def myconverter(variant):
      return variantConvertedToWhatIWant(variant)

   adodbapi.variantConversions[adoExactNumericTypes]=myconverter

There are also some testcases describing this in more detail.

/Henrik

> -----Original Message-----
> From: Marcos Sánchez Provencio [mailto:msanchez at grupoburke.com]
> Sent: den 2 maj 2003 12:46
> To: Henrik Ekelund
> Cc: 'db-sig at python.org'
> Subject: Re: [DB-SIG] ANN: adodbapi 2.0
> 
> 
> Does this module handle currency & decimal data without converting to
> inexact floating point numbers? I have browsed through the 
> source and it
> did not seem to. Is it planned? 
> 
> El mié, 30 de 04 de 2003 a las 18:35, Henrik Ekelund escribió:
> > NAME:
> >     adodbapi - A python DB API 2.0 interface to Microsoft ADO
> > 
> > DESCRIPTION:
> >     A 100% Python-DB API 2.0 compliant module that 
> >     makes it easy to use Microsoft ADO for connecting
> >     with databases and other data sources. Includes
> >     pyunit testcases. 
> > 
> > WHATS NEW:
> >     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.
> >     10. Two maling lists have been created, one for users 
> and one for
> > developers.
> > 
> > PLATFORM:
> >     Windows only
> > 
> > HOMEPAGE:
> >     <http://adodbapi.sourceforge.net>
> > 
> > LICENSE:
> >     Lesser GPL (fine for most commercial vendors)
> > 
> > 
> > Henrik Ekelund<http://sourceforge.net/sendmessage.php?touser=618411>
> > 
> > 
> 
> > 
> > _______________________________________________
> > DB-SIG maillist  -  DB-SIG at python.org
> > http://mail.python.org/mailman/listinfo/db-sig
> -- 
> Marcos Sánchez Provencio <msanchez at grupoburke.com>
> www.burke.es
> 


**********************************************************************
This email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************




More information about the DB-SIG mailing list