Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34073

Re: Migrate from Access 2010 / VBA

Date 2012-11-29 10:22 -0700
From Michael Torrie <torriem@gmail.com>
Subject Re: Migrate from Access 2010 / VBA
References <6db4ed18-a16e-4cd1-940b-c10f51207780@googlegroups.com> <m2d2yyy4jm.fsf@valheru.db3l.homeip.net> <62fbd558-ac46-4de9-90ca-b099a36b31e2@f17g2000vbz.googlegroups.com> <CAPM-O+zWx7Uj_+z6EHu+R6J17v6gEP1rzKv+J9mPyP_hSPgkZA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.368.1354209790.29569.python-list@python.org> (permalink)

Show all headers | View raw


On 11/29/2012 09:05 AM, Joel Goldstick wrote:
> This looks promising:
> http://www.codediesel.com/data/migrating-access-mdb-to-mysql/

Unfortunately I have not found mdb tools to be sufficient.  You can use
them to convert the schema to sql, and to reveal any mdb password (great
for looking at the data structures of compiled apps), but it can't
handle all the data types properly.  To get data out of an mdb file, I
wrote a simple python program that used pyodbc to get the data.  pyodbc
implements a standard python db api interface.  I opened the access
database file with:


MDB = 'C:/Path/to/frs_or_mdb_file'
DRV = '{Microsoft Access Driver (*.mdb)}'
PWD = 'ifneeded'

conn = pyodbc.connect('DRIVER=%s;DBQ=%s;UID=admin;PWD=%s' % (DRV,MDB,PWD))

curs = conn.cursor()

Then you can run queries with standard python db abi calls in standard
SQL syntax, and it's pretty easy to pull out the data and insert it into
a MySQL or PostgreSQL database.

This is for python on Windows of course, and has to have Access
installed, or at least the access engine.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Migrate from Access 2010 / VBA kgard <kagard@gmail.com> - 2012-11-22 19:19 -0800
  Re: Migrate from Access 2010 / VBA David Hutto <dwightdhutto@gmail.com> - 2012-11-22 22:33 -0500
  Re: Migrate from Access 2010 / VBA Jason Friedman <jason@powerpull.net> - 2012-11-22 21:35 -0700
  Re: Migrate from Access 2010 / VBA Peter Otten <__peter__@web.de> - 2012-11-23 10:08 +0100
  Re: Migrate from Access 2010 / VBA Wolfgang Keller <feliphil@gmx.net> - 2012-11-25 20:48 +0100
    Re: Migrate from Access 2010 / VBA kagard <kagard@gmail.com> - 2012-11-26 04:42 -0800
      Re: Migrate from Access 2010 / VBA Wolfgang Keller <feliphil@gmx.net> - 2012-11-27 20:27 +0100
    Re: Migrate from Access 2010 / VBA Nicolas Évrard <nicoe@altern.org> - 2012-11-29 11:46 +0100
    Re: Migrate from Access 2010 / VBA emile <emile@fenx.com> - 2012-11-30 10:16 -0800
  Re: Migrate from Access 2010 / VBA Michael Torrie <torriem@gmail.com> - 2012-11-26 09:21 -0700
    Re: Migrate from Access 2010 / VBA kagard <kagard@gmail.com> - 2012-11-27 09:36 -0800
    Re: Migrate from Access 2010 / VBA Wolfgang Keller <feliphil@gmx.net> - 2012-11-27 20:24 +0100
  Re: Migrate from Access 2010 / VBA David Bolen <db3l.net@gmail.com> - 2012-11-27 19:06 -0500
    Re: Migrate from Access 2010 / VBA Michael Torrie <torriem@gmail.com> - 2012-11-27 20:33 -0700
    Re: Migrate from Access 2010 / VBA kagard <kagard@gmail.com> - 2012-11-29 07:43 -0800
      Re: Migrate from Access 2010 / VBA Michael Torrie <torriem@gmail.com> - 2012-11-29 10:22 -0700

csiph-web