6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use DBI;
my $dsn = "DBI:ODBC:C:\\perl\\access\\db2.mdb";
my $dbh = DBI->connect($dsn, "", "");
$sth=$dbh->prepare("SELECT * FROM BAUTEIL");
$sth->execute;
while (my @ausgabe = $sth->fetchrow_array)
{
print $ausgabe[0]."\t".$ausgabe[1]."\t".$ausgabe[2]."\t".$ausgabe[3]."\n";
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my $mdb_file = "D:\\db1.mdb";
my $connection_string = q{;Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:System database=PfadZuDeinerSystemMdw};
my $cn = DBI->connect("dbi:ADO:Data Source=".$mdb_file.$connection_string, "");
my $alles = $cn->selectall_arrayref("SELECT * FROM Tabelle1");
foreach my $row ( @{$alles} ) {
print join (";", @{$row}), "\n";
}
1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my $mdb_file = "C:\\perl\\access\\db1.mdb";
my $connection_string = q{;Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:System database=C:\\WINNT\\system\\system.mdw};
my $cn = DBI->connect("dbi:ADO:Data Source=".$mdb_file.$connection_string, "");
my $alles = $cn->selectall_arrayref("SELECT * FROM Tabelle1");
foreach my $row ( @{$alles} ) {
print join (";", @{$row}), "\n";
}
1;
6 Einträge, 1 Seite |