MSSQL::DBlib error messages
- From: apomtree@xxxxxxxxx
- Date: 14 Nov 2005 12:58:42 -0800
Hi. 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 "<!-- $$dataref{id} -->\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.
.
- Prev by Date: Re: Messed up install
- Next by Date: Re: Messed up install
- Previous by thread: Installing Tk
- Next by thread: Net::Telnet not working with perl 5.8.5
- Index(es):
Relevant Pages
|
|