MSSQL::DBlib error messages
am 14.11.2005 21:58:42 von apomtreeHi. I'm pretty new to Perl and especially new to this particular MSSQL
module. I am curious how to retrieve detailed error messages in the
event a database error occurs. Here is a snippet of what I'm doing...
-----------------------------------------------------------
$dbh = MSSQL :: DBlib->dblogin($dbusr, $dbpw, $db);
$dbh->dbcmd("select top 1 id from ${dbowner}..mytable");
$dbh->dbsqlexec;
while ($dbh->dbnextrow2($dataref, 1) != NO_MORE_ROWS) {
print $MY_OUTFILE "\n";
}
-----------------------------------------------------------
If an error occurs, such as the DB is being restore or something stupid
like the table doesn't exist, how could I print my error to my output
file (MY_OUTFILE)?
Thanks for the help in advance.