Thanks,
ended up doing:
use DBI;
my $database = shift;
my $driver = "Microsoft Access Driver (*.mdb)";
print "$database :\n";
print "-----------\n\n";
my $dsn = "dbi:ODBC:driver=$driver;dbq=$database";
my $dbh = DBI->connect("$dsn") or die "Couldn't open database: $DBI::errstr; stopped";
my $sth = $dbh->table_info( "", "", "", "TABLE" );
while ( my ($catalog, $schema, $table, $type) = $sth->fetchrow_array() ) {
if ($table) {
print "\n$table :\n";
print "--------\n";
my $sql = "select * from $table";
# Prepare the SQL query for execution
my $sth = $dbh->prepare ("$sql")
or die "Couldn't prepare statement:$DBI::errstr; stopped";
# Execute the query
$sth->execute() or die "Couldn't execute statement: $DBI::errstr; stopped";
# Fetch each row and print it
while ( my (@row) = $sth->fetchrow_array() ) {
print "$_\t" foreach (@row);
print "\n";
}
}
}
$dbh->disconnect();
Long live king Moshiach !