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: Nathan Pilatzke <nathan at info dot load-otea dot hrdc-drhc dot gc dot ca>
Subject: what's the problem?
Date: Oct 23 1998 4:07PM

I have two error messages coming back to me and I'm not sure exactly what
either of them mean.  

Server message: (In srv_cb)
Message number: -131, Severity 0, State 0, Line 0
Server 'sqlsrvr2'
Message String: syntax error near '(end of line)'

Open Client Message: (In msg_cb)
Message number: LAYER = (1) ORIGIN = (4) SEVERITY = (1) NUMBER = (132)
Message String: ct_fetch(): user api layer: internal common library error:
The bind of result set item 1 resulted in truncation.

The first one seems non-fatal, but the second one truncates the rather
large 'long binary' data that I'm trying to read from the database.  Does
anyone have some hints as to how to not truncate my data and how to
satisfy these error messages.

The code used to generate the messages is the same code as in the sybperl
eg directory in the ctlib.pl script modified to print on a web page
(subroutines included below if needed).

thanks for any help,
nathanp.


sub msg_cb
{
    my($layer, $origin, $severity, $number, $msg, $osmsg) = @_;

    printf STDERR "\nOpen Client Message: (In msg_cb)\n";
    printf STDERR "Message number: LAYER = (%ld) ORIGIN = (%ld) ",
            $layer, $origin;
    printf STDERR "SEVERITY = (%ld) NUMBER = (%ld)\n",
            $severity, $number;
    printf STDERR "Message String: %s\n", $msg;
    if (defined($osmsg))
    {
        printf STDERR "Operating System Error: %s\n",
                $osmsg;
    }
    CS_SUCCEED;
}

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

    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;
}