5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/perl
use strict;
use warnings;
use DBI;
my $dsn = 'driver=Microsoft Access-Treiber (*.mdb); dbq=C:\datenbank.mdb';
my $dbh = DBI->connect("DBI:ODBC:$dsn") or die "Fehler beim Connect:",$DBI::errstr;
my $sth = $dbh->prepare("SHOW TABLES") or die $dbh->errstr();
$sth->execute() or die $dbh->errstr();
while(my @row = $sth->fetchrow_array()){
print @row,"\n";
}
1
2
3
4
use WIN32::ODBC;
my $db = new Win32::ODBC("SOMEDSN") or die "Can't create connection to DSN: $!\n";
my @tables = $db->TableList() or die "Can't get tables: $!\n"; $db->Close();
print join("\n", @tables);
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/perl
use strict;
use warnings;
use DBI;
my $dsn = 'driver=Microsoft Access-Treiber (*.mdb); dbq=C:\db.mdb';
my $dbh = DBI->connect("DBI:ODBC:$dsn") or die "Fehler beim Connect:",$DBI::errstr;
print $_,"\n" for($dbh->tables('','','%','TABLE'));
5 Einträge, 1 Seite |