RE: DBI and Sybase 'print' statements

"Avis, Ed" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <B6950B05C2FB1A418290414131B118B983E701@EXLN1-VS1.london.kbcfp.com>
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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.