Checking for ADO errors

Checking for ADO errors

am 15.02.2007 17:41:38 von Todd Cary

Is there a better way to check for ADO errors than what I have
done here using the die()?

$dbh = db_open($dbserver, $user, $password, $database) or die
("Cannot open database");
if ($dbh) {
$stmnt = "SELECT BadFieldName FROM MC";
$rs = $dbh->Execute($stmnt) or die("Cannot execute db_test");
}
if ($rs) $rs->close();
if ($dbh) $dbh->close();

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php