in reply to Flattening Access DB to XML

First, you don't need to create a permanent DSN for each file. DBD::ODBC supports dynamic connections by specifying the driver and other parameters. <code> my $dsn = 'dbi:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=\\\\cheese\\g$\\perltest.mdb' <code> Second, new versions of DBI have an interface for exploring the schema of databases. DBD::ODBC has one of the most complete implementations of these functions. Check out table_info and column_info.

Replies are listed 'Best First'.
Re: Re: Flattening Access DB to XML
by inman (Curate) on Jan 27, 2004 at 10:09 UTC
    The code that I have developed so far uses Win32::ODBC to do create/update a DSN and discover the driver to use, and names of the tables. DBI and DBD::ODBC are used to read each table in it's entirety and dump it to XML.

    I much prefer the idea of using a fully DBI based solution to do both the schema detection work and the database reading. I will update my code and post it later today for critique and further analysis.
    Thanks.