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: Mike Lucente <ml at vianetinc dot com>
Subject: CTlib extended error (CS_EXTRA_INF) (fwd)
Date: Nov 23 1998 7:03PM

Second request -- did I miss a reply or was I not making sense?

---------- Forwarded message ----------
Date: Fri, 20 Nov 1998 14:05:29 -0500 (EST)
From: Mike Lucente 
To: SYBPERL-L@listproc.net
Subject: CTlib extended error (CS_EXTRA_INF)

I'm using the following callback routine (supplied with SybPerl):

sub srv_cb
{
    my($cmd, $number, $severity, $state, $line, $server, $proc, $msg) =
@_;

    return CS_SUCCEED if ($severity < 11);

    printf STDERR "\nServer message: (In srv_cb)\n";
    printf STDERR "Message number: %ld, Severity %ld, ",
               $number, $severity;
    printf STDERR "State %ld, Line %ld\n",
               $state, $line;

    if (defined($server))
    {
    printf STDERR "Server '%s'\n", $server;
    }

    if (defined($proc))
    {
    printf STDERR " Procedure '%s'\n", $proc;
    }

    printf STDERR "Message String: %s\n", $msg;
                #
    CS_SUCCEED;
}

May I presume that 'cmd' is the most recently processed SQL command
and how would I go about getting CTlib to return it to me. The docs
suggest that I need only set CS_EXTRA_INF to CS_TRUE. The SybPerl manual,
however, makes reference to a 300 byte memory leak if/when extended
error information is requested. CTlib.c is looking for CS_HASEED to be
be on .... what's the right thing to do here folks?