Linux guy seeks help w/MS Access/Python

mksql at my-deja.com mksql at my-deja.com
Tue Aug 22 00:36:27 EDT 2000


On Mon, 21 Aug 2000 11:54:37 -0600, Albert Wagner <alwagner at tcac.net>
wrote:

>I'm on a linux system, but have just taken a job in a windows shop. Is
>there a way to manipulate MS Access within Python?  Can you point me
>towards appropriate docs?

If you want to work with an Access 'database' (ie Jet database), I
have found that using the DAO 3.6 (or 3.6) library through Mark
Hammond's Pythonwin/Pythoncom is the most convenient. Through this
library you have 'access' to all of the data objects and properties.
Using DAO does lock your code into Access/Jet databases. ADO is more
universal, but slightly less straightforward, IMO.

If you like, I can post some simple examples of Python code that uses
DAO to get at the data objects. If they do not appear soon, e-mail me
a reminder.

<PRO-Python windage follows>

Most often, I have used Python with Access databases to convert the
data into a more useful form (like _ASCII_), so that the data and
views can be ported into a more robust platform. As a matter of fact,
my first Python project was a project to write ANSI SQL from the table
and view definitions in Access databases, so that a more accurate E/R
model could be generated in Powerdesigner. The Access ODBC driver did
not expose enough information to make a complete model. Within a day
or two, the tool also was creating BCP scripts, data and format files.
The combination of Python, Pythonwin, and the DAO/ADO/ADOX COM
libraries made this task nearly easy! I have not used VB since.






More information about the Python-list mailing list