Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Flattening Access DB to XML

by iburrell (Chaplain)
on Jan 26, 2004 at 21:55 UTC ( [id://324281]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://324281]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (None)
    As of 2024-04-25 01:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found