[DB-SIG] Several newbie questions

M.-A. Lemburg mal at egenix.com
Wed Jan 10 22:10:59 CET 2007


On 2007-01-10 11:10, Grzegorz Adam Hankiewicz wrote:
> Hello.
> 
> I'm new to the world of Python database access. I've read the DB-API 
> documents and find the 2.0 version pretty nice. However, for my current 
> work I have to access a local .mdb file.
> 
> I've already been able to do it with the pywin32 odbc module, which 
> AFAIK it conforms to the DB-API 1.0. I've found adodbapi, which says it 
> is 2.0, but it fails with huge fireworks trying to access tables with 
> binary objects (something about COM objects being unknown), so I can't 
> use it. I've tried contacting the author but I'm waiting for any answer.
> 
> Is it right that there is no other MS Access python module? I guess I'll 
> have to use odbc then.

Try our mxODBC package (included in egenix-mx-commercial). This has
no problems accessing Access tables, provided you have the Access
ODBC drivers installed. You can get those from the MS MDAC site:

http://http://msdn.microsoft.com/data/Default.aspx

(download the MDAC package).

> Also, the DB-API 2.0 spec says several things about yet to be solved 
> issues, like loss-less currency types and such. Is there anywhere a 
> roadmap about this? Is a DB-API 3.0 in the works?

I think we should try for a DB-API 3.0 this year. I had planned to
start the process late last year, but then a whole lot of other
things kept me getting on with it.

> I've tried contacting the webmaster at python.org to tell that there's 
> no link for adodbapi and the odbc documentation/hint links are borken, 
> but have received no answer.
>
> Also, I've found http://adodb.sourceforge.net/ not listed on those 
> pages. It says it should work with access through odbc. 

If you want to use ADO, you should use the ADO drivers. Using
ADO to talk to the database through ODBC is just adding an API stack
on top.

> Has somebody 
> tried this with success? The python documentation mentions that it has 
> to drift from the DB-API 2.0 spec due to limitations in how rows are 
> retrieved. Is this some sort of big split in the Python database 
> community? I mean, is this going to be addressed by a future PEP or are 
> people leaving DB-API 2.0 in favor of the adodb api?

Very unlikely :-)

DB-API has been around for more than 10 years now and the number
of available database modules written against the spec proves
that it has had success in achieving its goal, namely to provide
a platform on which to build database application for Python.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 10 2007)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the DB-SIG mailing list