|
|
sybperl-l Archive
Up Prev Next
From: arthur at puma dot mt dot att dot com
Subject: Re: DBD::Sybase message handling question
Date: Jul 10 2001 6:46PM
Thanks for the response. Follow up question:
How do I get at the messages inside the main program?
use DBI;
$dbh=DBI->connect('dbi:Sybase:','','');
sub jj{
($err, $sev, $state, $line, $server, $proc, $msg) = @_;
return 0;
};
$sth = $dbh->prepare('sp_help cp_user');
$dbh->{syb_err_handler}=\&jj;
$sth->execute;
do {
while($d=$sth->fetch) {
$out_put .= "@$d==\n";
}
$out_put .= $msg; # I want to put the message inside of $out_put
}while ($sth->{syb_more_results});
Arthur
From: Michael Peppler
Message-ID: <15179.11556.246449.836532@troll.peppler.org>
Date: Tue, 10 Jul 2001 09:28:20 -0700
To: SybPerl Discussion List
Subject: Re: DBD::Sybase message handling question
In-Reply-To: <200107101621.MAA28778@elm.mt.att.com>
Content-Length: 423
Status: RO
arthur@puma.mt.att.com writes:
> How do I prevent the "error" messages from being sent to stderr if I have
> an error handler? In the example below, each message is printed twice, i.e.
> "Lock scheme Allpages".
Return 0 from the handler.
Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
|