Read MS Access 97 *.mdb files with python??
Andrew Robinson
andy at robanal.demon.co.uk
Wed May 5 17:17:58 EDT 1999
gemodek at t-online.de (gemodek) wrote:
>
>But,.. yes I am the guy who asked about accessing Access database on
>Linux.
>My idea is the following:
>At my company we are running 4 Win95 PC's on a network which works
>sometimes
>and crash sometimes (some days no reboot, some days 5-10 times).
>Now I am tired of the whole Win stuff, and I will install an Linux
>Server
>with Samba. (OK, the clients are still Win95, but at least the server is
>linux).
The problem with databases is a smooth migration path. Will a daily
(hourly?) copy of Access do while you migrate? or do all users need
to modify it all the time?
These tips might help:
(1) You can write something using Pythonwin and DAO to extract the
whole contents of an Access database - loop over the tables collection
and fetch them all. Either put them in another database (e.g. MySQL)
or make a dictionary of (name, table) pairs and marshal the lot. I
write a program once which took copies of a 3MB Access database and
reduced it to a 900kn marshalled Python file; the whole database
loaded into RAM in 1 second on a Pentium 90.
(2) Get MySQL, write a Python export program which runs under windows
as above, but inserts into te MySQL database using ODBC. Start
running it regularly Do some totalling/counting queries on both to
prove you have ported 100% of your data.
(3) If you can get your client programs to connect using the ODBC
driver, you can then switch Windows clients over the the MSQL server
with almost no effort.
More information about the Python-list
mailing list