Re: DBD::Sybase message suppression....

From: Michael Peppler (mpeppler_at_peppler.org)
Date: 07/22/04


To: dbi-users@perl.org
Date: Thu, 22 Jul 2004 07:47:37 +0200

On Wed, 2004-07-21 at 23:06, amonotod wrote:
> Hello,
> I'm using DBD::Syabse in a script (which is working just
> beautifully, thanks to the authors of DBI and the DBDs - Thank you,
> people), and I'm doing some sp_add/droplogin/sp_dropdevice statements.
> These also work just fine, but print message regardless of whether I
> execute() them or do() them...
>
> Device dropped.
> Device dropped.
> Account locked.
> Login dropped.
> Password correctly set.
> Account unlocked.
> New login created.

These "messages" are generated via "PRINT" statements in the stored
procedures.

PRINT statements are sent to the client via the server message callback,
with an error number of 0. You can trap these by using an error handler.
See the syb_err_handler attribute in the DBD::Sybase docs for details.

Michael

-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html


Relevant Pages

  • Setting Error Handler
    ... I'm trying to implement a mechanism where a DBI program can detect its DB ... Basically I have set up a custom error handler that checks for certain ... If however the error occurs a second time, the custom error handler doesn't ... Can anyone tell me if this is a bug with the old version of DBI we are ...
    (perl.dbi.users)
  • RE: Setting Error Handler
    ... Subject: Setting Error Handler ... I'm trying to implement a mechanism where a DBI program can detect its DB ... Basically I have set up a custom error handler that checks for certain ...
    (perl.dbi.users)
  • Re: Problems with database handle attributes in error handle
    ... I have my own error handler in which I'd like to log as much detail about the ... Is this correct behavior? ... It's a tied hash and the DBI doesn't provide a useful EXISTS method. ...
    (perl.dbi.users)