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: "Ernest Wong" <chunsang at hotmail dot com>
Subject: Problem updating Text Column
Date: Mar 2 2000 11:43AM


I have problem using the CTlib to update a Text column; below is the
source code and the error log.  "SELFDESC" is a Text column, and I
basically followed the example of the sybperl manual.  Note that debug
is turned on.

Any help or suggestion is much appreciated.
Thanks.

Ernest Wong

# begin source code

Sybase::CTlib::debug(TRACE_ALL);

$dbh->ct_execute("select LOGINID, SELFDESC from SHOP where 
LOGINID=\"$loginid\""
);
while ($dbh->ct_results($restype)==CS_SUCCEED) {
  next unless($dbh->ct_fetchable($restype));
  my @dat;
  while (@dat = $dbh->ct_fetch) {
     print "@dat\n";
     $dbh->ct_data_info(CS_GET, 2);
  }
}
my @dat;
$dbh->ct_command(CS_SEND_DATA_CMD, '', CS_UNUSED, CS_COLUMN_DATA);
$dbh->ct_data_info(CS_SET, 2, {total_txtlen => length($selfdesc)});
$dbh->ct_send_data($selfdesc, length($selfdesc));
$dbh->ct_send;
while ($dbh->ct_results($restype) == CS_SUCCEED) {
  next unless $dbh->ct_fetchable($restype);
  while (@dat = $dbh->ct_fetch) {
        print "@dat\n";
  }
}

# end source code


#begin error log

SybTools=HASH(0x8349124)->ct_execute('select LOGINID, SELFDESC from SHOP 
where LOGINID="f12"') == 1 at /home/catalog/cgi-bin/signup.pl line 73.
SybTools=HASH(0x8349124)->ct_results(4040) == 1 at 
/home/catalog/cgi-bin/signup.pl line 74.
SybTools=HASH(0x8349124)->ct_fetch() called in SCALAR context at 
/home/catalog/cgi-bin/signup.pl line 77.
SybTools=HASH(0x8349124)->ct_fetch(FALSE) == 1 at 
/home/catalog/cgi-bin/signup.pl line 77.
SybTools=HASH(0x8349124)->ct_fetch pushes 'f12            ' on the stack at 
/home/catalog/cgi-bin/signup.pl line 77.
SybTools=HASH(0x8349124)->ct_fetch pushes undef on the stack at 
/home/catalog/cgi-bin/signup.pl line 77.
Use of uninitialized value at /home/catalog/cgi-bin/signup.pl line 78.
SybTools=HASH(0x8349124)->ct_fetch() called in SCALAR context at 
/home/catalog/cgi-bin/signup.pl line 77.
SybTools=HASH(0x8349124)->ct_fetch(FALSE) == -204 at 
/home/catalog/cgi-bin/signup.pl line 77.
SybTools=HASH(0x8349124)->ct_results(4046) == 1 at 
/home/catalog/cgi-bin/signup.pl line 74.
SybTools=HASH(0x8349124)->ct_results(135746964) == -205 at 
/home/catalog/cgi-bin/signup.pl line 75.
SybTools=HASH(0x8349124)->ct_command(151, '(null)', -99999, 193) == 1 at 
/home/catalog/cgi-bin/signup.pl line 83.

Server message:
Message number: 156, Severity 15, State 1, Line 1
Message String: Incorrect syntax near the keyword 'NULL'.


Open Client Message:
Message number: LAYER = (4) ORIGIN = (2) SEVERITY = (6) NUMBER = (50)
Message String: ct_send_data(): protocol specific layer: internal Client 
Library
error: There is an internal tds layer error. An error was returned from the 
ser
ver while processing an internal tds stream.

Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (167)
Message String: ct_send(): user api layer: external error: This routine 
cannot b
e called because the command structure is in an undefined state.

Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (167)
Message String: ct_results(): user api layer: external error: This routine 
canno
t be called because the command structure is in an undefined state.
SybTools=HASH(0x8349124)->ct_results(135746964) == 0 at 
/home/catalog/cgi-bin/si
gnup.pl line 90.
Destroying SybTools=HASH(0x8349124).

Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (167)
Message String: ct_cmd_drop(): user api layer: external error: This routine 
cann
ot be called because the command structure is in an undefined state.
[In DESTROY] Freeing refCon.
[In DESTROY] Freeing info.

# End of error log
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com