#------------------------------ # tkttest.pl use DBI; use strict; my $DSN= 'tkt.dsn'; my $dbh = undef; my @row; #DBI->trace(3); if ( $dbh = DBI->connect("dbi:ODBC:$DSN", '', '') ) { print "success!\n"; my $sth = $dbh->prepare(" SELECT TCKT_VALID, SERIAL, MACHINE from tcktrdmp WHERE TCKT_VALID=89959"); $sth->execute(); while ( @row = $sth->fetchrow_array ) { print "$row[0] | $row[1] | $row[2]\n"; } } else { print "failure |$DBI::errstr|\n"; } # -------------------------------