Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: text field insertion being truncated
Date: Aug 30 1999 2:33PM

Sheree A. Hemphill writes:
 > I have a series of text files that I need to insert as records into a text
 > field.  I am using the following stops to accomplish the insert:
 > I open the text file to be inserted.
 > I copy the contents into an array:
 > 	@genbank = ;
 > Then I insert the text into field TEXT (along with a variable for field AC)
 > as follows:
 > 	if ($fn ne "error") {
 > 		$dbh->ct_sql("insert into SOURCESEQ (AC, TEXT) values
 > ('$fn','@genbank')");
 > 	}
 > I close the file & repeat the above steps for a series of these file.
 > The problem I am having, is that the text I am inserted gets truncated when
 > I look at the field in sybase.  Is there a maximum that sybperl is able to
 > transfer with the above query?  Any other ideas on why this might be
 > happening?

Normally the insert should be happening just fine, but Sybase limits
the size of TEXT fields to 32k by default when you SELECT them. You
can change this limit by using the SET TEXTSIZE xxxx command. See
the SET command in the Transact-SQL command reference manual.

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: