Hi, Please help ! I am new to perl and I am testing if perl can connect to a MS Access97 database and retrive some records. The following is the line inside an eval code block: it runs but no result. I don't know if the database can be open. why there is no error message? (All the variables are properly declared and contain valid value)
eval {
$dbh = DBI->connect($dsn,$user,$pswrd,$driver,{RaiseError=>1} ) or die "Database
connection not made: $DBI::errstr";
print "Inside eval, dbh=$dbh";
$sth = $dbh->prepare($sql);
$sth->execute();
while (my @rs = $sth->fetchrow())
{
print rs[0];
}
};