DB API for ADO/DAO?

Steve Holden sholden at holdenweb.com
Tue Apr 15 10:00:57 EDT 2003


"John Burton" <john.burton at jbmail.com> wrote in message
news:2402252b.0304142353.2b4711ae at posting.google.com...
> I want to be use an .MDB database from a python application on
> windows.
>
> The problem with odbc is that you need to manually set up data sources
> using the control panel which isn't something I want the users to have
> to do.
>
> So I'm using DAO via com to access the database and it's working fine
> except that I have to use the DAO com api instead of the standard
> python api. So I was wondering if there is a suitable DB API wrapper
> for DAO or ADO I can use? Or a better solution to my problem?

As well as the other responses pointing you to ADO code, also note that
mxODBC allows you to use DSN-less data sources.  From the mxODBC docs: """If
you want to connect to a file data source (without having to configure it
using the ODBC manager), you can do so by using the FILEDSN= parameter
instead of the DSN= parameter:
     DriverConnect('FILEDSN=test.dsn;UID=test;PWD=test')

This is sometimes useful when you want to dynamically setup a data source,
e.g. a MS Access database."""

Thanks to Marc-Andre Lemburg for pointing this out (and also for a fine
database module).

regards
--
Steve Holden                                  http://www.holdenweb.com/
How lucky am I?      http://www.google.com/search?q=Steve+Holden&btnI=1
Python Web Programming                 http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list