in reply to How to display an Access database

Do you need to use OLE? Access is a "database" so the natural way to access it in Perl is using DBI.

To open an Access database use:

# Open the database: my $dbh = DBI->connect ('dbi:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' . $db_file) +;

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: How to display an Access database
by jobs_ron (Acolyte) on Jun 18, 2007 at 23:07 UTC
    I prefer OLE because it's what I know. I don't know anything about DBI (I'm trying to learn it currently).

    My question then is will this simply open and display the Access file? What I need is the same thing a system call does. I don't want to open it to send/receive data.

      The snippet I gave will open a database handle on the database file. It is almost exactly like using open to open a file handle.

      I'd be inclined to just use system or backticks to run the Access application if that is all you want to achieve.


      DWIM is Perl's answer to Gödel
        Okay, I'll look into your DBI code. Thanks for your help.