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: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: DBI and Sybase 'print' statements
Date: Aug 18 2005 3:39PM

Steven Wechsler asked:

>How can I intercept sybase print statements using DBI?

    $dbh = DBI->connect($str, $login, $password,
                        {
                            syb_err_handler => sub {
                                if ($_[0] == 0) {
                                    # Print to stdout and then ignore.
                                    print "$_[6]\n";
                                    return 0;
                                }
                                return 1; # handle other errors normally
                            },
                        });

I think print in T-SQL raises an 'error' with severity of zero.

-- 
Ed Avis