|
|
sybperl-l Archive
Up Prev Next
From: Mike Lucente <ml at vianetinc dot com>
Subject: CTlib extended error (CS_EXTRA_INF)
Date: Nov 20 1998 7:05PM
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?
|