I do not use Win32:ODBC, since I have had trouble with it. I use fetchrow_hashref and then I get just the columns I need and push them into my keeper stack. In the following example, Phoophoo is the name of the MS Access database configured under ODBC and X_Master is the name of the table. Here is a snippet of the code that I use:
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