my ($ret) = $l_dbh->selectrow_array("select dummy from "
. $l_dbh->quote_identifier($dblink, 'SYSIBM', "SYSDUMMY1") );
$ret;
};
views:
60answers:
2
+3
A:
Your question is hardly clear, but it sounds like you're looking for the DBI error attributes: err
(the native database error code), errstr
(the native database error message), and state
(a standard SQLSTATE five character format, but not widely supported).
cjm
2010-03-05 21:56:34
A:
I think what you want is to follow your statement with:
my $sqlerr = $l_dbh->errstr;
However, you may not get that far if $l_dbh->{RaiseError} is set, as that will cause your program to crash on any error (with the error message). So you will want to do a
$l_dbh->{RaiseError} = 0;
first
jimbob
2010-04-21 21:20:04