PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: rep server & Sybperl (pt 2)
Date: Apr 29 2004 2:20PM

On Thu, 2004-04-29 at 14:28, Steve Wechsler wrote:
> > From: Michael Peppler [mailto:mpeppler@peppler.org]
> > If it doesn't come back as a result set (table/row format), then it
> > comes back as a "message". In DBlib it will be available in 
> > the message
> > handler (see dbmsghandle()) with a message number of 0.
> > 
> > Michael
> 
> Is there any way to retrieve it from nsql's message handler? Or do I need to
> use my own?

You'll have to use your own, I think.

But you could chain them - as the dbmsghandle() call will return the
previously defined handler, so you could do something like:

my $old_handler;

sub my_handler {
    my (@params) = @_;

    # handle the messages here, 
    # then call the old handler....
    $old_handler->(@_);
}

$old_handler = dbmsghandle(\&my_handler);

... rest of code ...

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