in reply to MS Access and Win32::ODBC problem
use DBI; my $dbh = DBI->connect( "dbi:ODBC:phoophoo", "", "", {RaiseError => 1, PrintError => 1, AutoCommit => 1} ) or die "Unable to connect: " . $DBI::errstr . "\n"; my $sql="SELECT col_one FROM X_Master WHERE col_one <> ''"; print "$sql\n" if $VERBOSE; my $sth = $dbh->prepare($sql) || die $dbh->errstr(); $sth->execute() || die $sth->errstr(); while( my $row = $sth->fetchrow_hashref ) { push @new_col, $row->{col_one}; } $sth->finish(); $dbh->disconnect;
Richard
There are three types of people in this world, those that can count and those that cannot. Anon
|
---|