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: George Brink <siberianowl at yahoo dot com>
Subject: sybperl, truncation error
Date: Jun 4 2010 6:34PM

The code is simple:
$dbh->ct_execute('call to stored procedure') || die;
while($dbh->ct_results($restype) == CS_SUCCEED) {
	next unless $dbh->ct_fetchable($restype);
	while(	my (@fields) = $dbh->ct_fetch ) {
		foreach  (@fields) {$_='' unless defined};
		print F join ($field_delimiter, @fields);
		print F "\n";
	}
	last;
}
$dbh->ct_cancel(CS_CANCEL_ALL);


I got an error and do not know how to fix it:

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 11 resulted in truncation.

OC's documentation mentions the possibility of such error if client 
attempts to read wide strings (more than 255 characters wide). But my 
column number eleven in the resultset is a datetime field. How can it 
cause this error?